Debugging include_once

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

Debugging include_once

Postby MarcF » April 14th, 2014, 8:12 am

I've recently purchased PHP Tools for VS 2013.

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

Postby Miloslav Beno » April 15th, 2014, 1:23 pm

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.
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm

Re: Debugging include_once

Postby MarcF » April 15th, 2014, 2:27 pm

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

Postby Miloslav Beno » April 15th, 2014, 2:40 pm

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. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 66 guests

User Control Panel

Login

Who is online

In total there are 66 users online :: 0 registered, 0 hidden and 66 guests (based on users active over the past 5 minutes)
Most users ever online was 511 on April 27th, 2024, 10:11 pm

Users browsing this forum: No registered users and 66 guests