microsoft / microsoft/vscode-cpptools
Unable to set conditional breakpoint containing double-quotes: "Problem parsing arguments: break-insert -f -c"
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Type: Debugger
Problem: Unable to set conditional breakpoints (expressions) that contain double-quotes. I can side step the issue by escaping all of the double-quotes in the expression but that is not intuitive for those who use the UI for debugging and are unfamiliar with GDB/MI. I'd argue that vscode should escape all user-provided expressions (conditional breakpoints, watches, etc.) that are provided to GDB/MI.
- OS and Version:
RHEL 7 - VS Code Version:
1.39.2 - C/C++ Extension Version:
0.26.1 - Other extensions you installed (and if the issue persists after disabling them):
None
To Reproduce
- Create a conditional breakpoint (expression) with the following value:
$_streq(some_string,"/tmp/foobar")
- Start debugging (
F5). Break point turns gray and hovering over the breakpoint displays:
Problem parsing arguments: break-insert -f -c "$_streq(some_string,"/tmp/foobar")" at file.c:23
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the conditional breakpoint with $_streq(some_string,"/tmp/foobar") and inspect how the extension constructs GDB/MI break-insert arguments. Trace the conditional breakpoint path and verify that user-provided expressions containing double-quotes work without manual escaping.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript
- Domain
- devtools, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100