Repository navigation
Accept a quoted FILE:LINE in %debug --breakpoint - #15434
Merged
Carreau merged 4 commits intoOct 21, 2026
Merged
Conversation
A path with spaces can only be passed quoted, but the argument parser keeps the quotes, so `%debug --breakpoint "My Project/a.py:2" f()` failed with `ValueError: invalid literal for int() with base 10: '2"'`. Strip matching surrounding quotes before splitting FILE:LINE, as %alias_magic and %%writefile already do for their arguments. Fixes ipython#14098 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Carreau
reviewed
Oct 21, 2026
Carreau
approved these changes
Oct 21, 2026
Carreau
reviewed
Oct 21, 2026
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.
Fixes #14098. 🤖🤖 (written with an AI coding agent, Claude Code)
A breakpoint in a file whose path has spaces (e.g. a venv under macOS
Application Support) can only be given quoted, butarg_splitkeeps the quotes, so%debug --breakpoint "My Project/a.py:2" f()failed withValueError: invalid literal for int() with base 10: '2"'. Unquoted, the path is split at the space. This strips matching surrounding quotes before splittingFILE:LINE, the same way%alias_magicand%%writefilehandle their quoted arguments.The new test puts a module in a folder with a space, sets a quoted breakpoint on a line after the first one (the first line of the file is already a stop), and checks through
bdbthat the breakpoint was set on that line and hit once.