Debugging include_once
4 posts
• Page 1 of 1
Debugging include_once
I've recently purchased PHP Tools for VS 2013.
If I hit an error on a php script which has been included as follows:
I get a debug error on the include_once line. The exception contains no further information that allows me to determine where in "plugin-globals.php" the exception has come from. This could become something of a show stopper for larger php files.
Any advice?
Marc
If I hit an error on a php script which has been included as follows:
- Code: Select all
include_once "plugin-globals.php";
I get a debug error on the include_once line. The exception contains no further information that allows me to determine where in "plugin-globals.php" the exception has come from. This could become something of a show stopper for larger php files.
Any advice?
Marc
- MarcF
- Posts: 3
- Joined: April 14th, 2014, 8:08 am
Re: Debugging include_once
Hi,
What is the name of the exception? If it's directly on include_once statement it's most likely something that prevents from running the script at all... e.g parse error. You'd see error of this kind in error list when you open the file.
What is the name of the exception? If it's directly on include_once statement it's most likely something that prevents from running the script at all... e.g parse error. You'd see error of this kind in error list when you open the file.
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: Debugging include_once
yes, it is a parse error. I was expecting some sort of line number to the parse error?
- MarcF
- Posts: 3
- Joined: April 14th, 2014, 8:08 am
Re: Debugging include_once
Unfortunately xdebug doesn't provide us with this kind of information during runtime. But if you open the file and click on the error from error list pane it should take you to the line. Does it?
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 66 guests