View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002280 | Xdebug | Step Debugging | public | 2024-07-09 19:22 | 2024-12-15 21:21 |
Reporter | anton.m4354 | Assigned To | derick | ||
Priority | normal | Severity | feature | Reproducibility | have not tried |
Status | resolved | Resolution | not fixable | ||
Summary | 0002280: PHP Exception breakpoints: Abitilty to stop on uncaught or caught exceptions only | ||||
Description | While in JS it is possible to separately stop only on caught or only on uncaught exceptions, this is not implemented in xdebug. The ticket was originally opened in jetbrains, but they said that this should be implemented on the xdebug side. | ||||
Tags | No tags attached. | ||||
Operating System | |||||
PHP Version | 8.2.0-8.2.9 | ||||
|
When an exception is thrown, Xdebug can intercept this and break on it, as it currently allows through Exception breakpoints. At this state, PHP (and hence Xdebug) does not yet know whether the exception is being caught so there is no possibility of discerning whether it is a "caught" or "uncaught" exception. |
|
@derick Thanks for the note. We need a way to stop execution ONLY when the exception is left uncaught in the entire call hierarchy and reaches the top (bottom?) of the stack. There should be a difference between an exception that is handled gracefully in a I understand in the latter case the stack is already unwound, and stopping at the exception line may sound weird, but both JS and C# debuggers seem to have found a way to do exactly that, which is what inspires this ticket (and the original PHPStorm ticket). |
|
Please take my saying that other debuggers can stop on exactly that line with a grain of salt; it's been a while since I worked with both of the languages and I may be misremembering. Other parts of the tooling or the IDE may also be helping to find the exact exception line. For example, C# exceptions store the entire stack trace and that's how even after the stack is unwound the IDE can still find the exception line. |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-07-09 19:22 | anton.m4354 | New Issue | |
2024-07-17 09:42 | derick | Assigned To | => derick |
2024-07-17 09:42 | derick | Status | new => resolved |
2024-07-17 09:42 | derick | Resolution | open => not fixable |
2024-07-17 09:42 | derick | Note Added: 0006994 | |
2024-12-15 21:03 | azad | Note Added: 0007119 | |
2024-12-15 21:21 | azad | Note Added: 0007120 |