2

I am using .inc as a file extension throughout my PHP application to represent included classes. When using Xdebug with a debugging client (ie. PHPStorm), I am unable to debug set breakpoints on these individual files. The client only appears to observe breakpoints on .php files. I've tested another client called MacDBGp and am experiencing the same problems.

Is there a way to configure Xdebug to support other file types than the standard .php extension? Or is this a limitation by the DBGp protocol?

1
  • Is there any reason why you chose to use .inc and not .inc.php? I assume you dug through the documentation already and found that there is no way to configure this option. Maybe make a feature request on the bug tracker? Commented Jul 31, 2012 at 17:43

1 Answer 1

1

Using .inc is insecure. Rename your files at minimum to .inc.php

Here's a quick way to recursively rename your files:

find /path/to/www -type f | sed 's/\(.*\)\.inc/mv \1.inc \1.inc.php/' | sh
Sign up to request clarification or add additional context in comments.

2 Comments

Why is it stupid and insecure? There is no reasoning behind your argument.
Because if you deploy your code to standard server or your configs get reset during an update your source code is immediately exposed. In some shared environments it simply wont work. Not only that, anyone unfamiliar with the project would need to open the file to figure out what's in there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.