PHP Exceptions window not showing on throw
7 posts
• Page 1 of 1
PHP Exceptions window not showing on throw
I'm trying to get the Exception message window to show as shown on the Facebook page:
But I don't seem to be able to get it to show.
I've ticked all the PHP exceptions in the Debug > Exceptions window and followed the instructions at http://www.devsense.com/doc/phptools/de ... leshooting. Note that I can debug by stepping through the code and seeing their values just fine, it's just that I don't see the Exception popup.
I am on Visual Studio 2012 and PHP Tools for VS 1.8.4704 running on Windows 8 32bit.
This code for me does not show up an Exception message. Can anyone else confirm this should show the Exception popup message? I just see 'start' printed and that's it.
Any help would be appreciated! Thanks
But I don't seem to be able to get it to show.
I've ticked all the PHP exceptions in the Debug > Exceptions window and followed the instructions at http://www.devsense.com/doc/phptools/de ... leshooting. Note that I can debug by stepping through the code and seeing their values just fine, it's just that I don't see the Exception popup.
I am on Visual Studio 2012 and PHP Tools for VS 1.8.4704 running on Windows 8 32bit.
This code for me does not show up an Exception message. Can anyone else confirm this should show the Exception popup message? I just see 'start' printed and that's it.
- Code: Select all
<?php
echo 'start';
throw new Exception("broken");
echo 'end';
?>
Any help would be appreciated! Thanks
- jaywick
- Posts: 3
- Joined: November 7th, 2013, 2:46 am
Re: PHP Exceptions window not showing on throw
Hi Jay,
Thanks for the post!
In the sample code you've submitted you should get exception message even if nothing is checked in Debug Exception dialog. As unhandeled exception is considered Fatal error.
Could you please alter your php.ini by adding this:
xdebug.remote_log = PATH_TO_LOG. Save, restart the server.
Run the script and send the log file. We'll be able to identify what's happening.
Thanks,
Thanks for the post!
In the sample code you've submitted you should get exception message even if nothing is checked in Debug Exception dialog. As unhandeled exception is considered Fatal error.
Could you please alter your php.ini by adding this:
xdebug.remote_log = PATH_TO_LOG. Save, restart the server.
Run the script and send the log file. We'll be able to identify what's happening.
Thanks,
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: PHP Exceptions window not showing on throw
Hi Miloslav, I've attached the log file. Thanks!
You do not have the required permissions to view the files attached to this post.
- jaywick
- Posts: 3
- Joined: November 7th, 2013, 2:46 am
Re: PHP Exceptions window not showing on throw
Hi Jay,
Thank you so much for log! From it I can see you are debugging this file [url]file:///C:/Users/Jay/Desktop/test_php-deleteme/PHPWebProject1/PHPWebProject1/index.php[/url]
and that PHP Tools sets everything well for exceptions to be thrown. But the script just completes without breaking.
The file is exactly the same as you've posted above? If you put breakpoint on second line with
Does it break?
If you want we can make online session. If you are interested give me know I'll send you instructions.
Thanks,
Thank you so much for log! From it I can see you are debugging this file [url]file:///C:/Users/Jay/Desktop/test_php-deleteme/PHPWebProject1/PHPWebProject1/index.php[/url]
and that PHP Tools sets everything well for exceptions to be thrown. But the script just completes without breaking.
The file is exactly the same as you've posted above? If you put breakpoint on second line with
- Code: Select all
echo 'start';
Does it break?
If you want we can make online session. If you are interested give me know I'll send you instructions.
Thanks,
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: PHP Exceptions window not showing on throw
Yes the file is exactly as what I pasted above (a throw with two echoes around it).
The following lines break as expected when a breakpoint is set on them:
but not for this one:
Stepping into the line with the 'throw' simply stops the debugging.
Sure, this sounds good!
The following lines break as expected when a breakpoint is set on them:
- Code: Select all
echo 'start';
throw new Exception("broken");
but not for this one:
- Code: Select all
echo 'end';
Stepping into the line with the 'throw' simply stops the debugging.
If you want we can make online session. If you are interested give me know I'll send you instructions.
Sure, this sounds good!
- jaywick
- Posts: 3
- Joined: November 7th, 2013, 2:46 am
Re: PHP Exceptions window not showing on throw
Jay,
This should stop script execution of the script as it's unhandled exception,but VS should throw exception window.
Could you please send also your php.ini and phpinfo() output? There might be some settings responsible for this.
Anyway I'll send you private message about the direct session.
Thanks!
Stepping into the line with the 'throw' simply stops the debugging.
This should stop script execution of the script as it's unhandled exception,but VS should throw exception window.
Could you please send also your php.ini and phpinfo() output? There might be some settings responsible for this.
Anyway I'll send you private message about the direct session.
Thanks!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: PHP Exceptions window not showing on throw
This was caused by this directive in php.ini:
Commenting this out, or just changing the value to 1 solves it.
Thanks,
- Code: Select all
xdebug.default_enable=0
Commenting this out, or just changing the value to 1 solves it.
Thanks,
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 219 guests