View Issue Details

IDProjectCategoryView StatusLast Update
0001761XdebugStep Debuggingpublic2020-03-12 18:51
ReporterTiibaAssigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Product Version2.9.2 
Target VersionFixed in Version 
Summary0001761: Xdebug stops on caught errors
Descriptionzend_extension=php_xdebug-2.9.2-7.3-vc15-x86_64.dll
xdebug.remote_enable=1
xdebug.remote_autostart=1

Using Windows 10, VS Code (just updated it), and PHP Debug extension. If I select some of the checkboxes that make the debugger stop on exceptions/errors/warnings/notifications, it does so - even if the exception is handled by a try/catch block, or the statement has the @ symbol in front of it to suppress messages.

Really annoying. I want to be notified of errors, but not ones I already dealt with.

The annoyingness is compounded by the fact that the errors can come from code that's not even part of my project. I understand it's the IDE's job to filter that, but Xdebug sends the message that there was an error.
Steps To ReproduceThis invariably happens when I open phpMyAdmin. Just turn on the 'Everything' checkbox and open it. XDebug stops in file phpMyAdmin\vendor\phpmyadmin\sql-parser\src\Context.php on line 463 (public static function load($context = '')). This line throws an exception, which is then caught by the function that calls this one.
Tagswindows
Operating System
PHP Version7.3.5-7.3.9

Activities

derick

2020-03-12 18:51

administrator   ~0005294

Hi,

this is per design. If you get your IDE to ask Xdebug to break on exception **throws** then it will break. Xdebug does not know whether you're going to handle the exception when it is thrown, so it can't not break. If you don't want to break on exceptions, then don't instruct your IDE to break on exceptions, or, specify only the specific exception classes that you do want to break on.

cheers,
Derick

Issue History

Date Modified Username Field Change
2020-03-12 08:04 Tiiba New Issue
2020-03-12 08:04 Tiiba Tag Attached: windows
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:37 derick Category Variable Display => Step Debugging
2020-03-12 18:51 derick Assigned To => derick
2020-03-12 18:51 derick Status new => resolved
2020-03-12 18:51 derick Resolution open => no change required
2020-03-12 18:51 derick Note Added: 0005294