Repository navigation
fix(xdebug): drop a leading backslash from an exception breakpoint class - #403
Merged
Merged
Conversation
Xdebug matches an exception breakpoint by the class name as PHP holds it, with no leading backslash: "\RuntimeException" was accepted, shown resolved and never fired. normalize() now strips one leading backslash, so the UI, REST and MCP send "RuntimeException"; "*" stays allowed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Xdebug matches an exception breakpoint by the class name as PHP holds it, with no leading
\.breakpoint_set -t exception -x "\RuntimeException"is accepted (shownresolved) and never fires — from the UI, REST and MCPxdebug_breakpoint_setalike.SavedBreakpoint.normalize()now strips one leading\fromexception;*stays allowed; a lone\is rejected as empty. Doc comment, error text and the MCP schema hint now showThrowable/App\Exceptions\PaymentFailed.Tests
TestBreakpoints_ExceptionLeadingBackslash(table:\RuntimeException,\App\Errors\Payment,RuntimeException,*, lone\) checks the stored class and thebreakpoint_setcommand; fails without the fix.TestBreakpoints_SentAtStartWithStateand the REST test updated to the stripped name.go vet ./modules/xdebug/clean;go test -race -count=1 ./modules/xdebug/ok.-x \RuntimeException→runendsstopping;-x RuntimeException→status="break"withexception="RuntimeException".Made with harnsy