microsoft / microsoft/vscode-cpptools
function breakpoints are not shown in text editor
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Environment
- OS and version: Windows 11
- VS Code: 1.99.3
- C/C++ extension: 1.24.5
- OS and version of remote machine (if applicable): N/A
- GDB / LLDB version: N/A
Bug Summary and Steps to Reproduce
Bug Summary:
When program breaks due to function-breakpoint, there is no indicator why. I checked the various consoles, but no feedback. I think I was confused because I set the breakpoint, but it doesn't show in the text editor. If it showed in the text editor, and the program broken with program-counter pointing to function-breakpoint, that would make sense.
Steps to reproduce:
- With CL.EXE build and debug
- Make a simple C program with main() and fib() functions
- Set a function-breakpoint on fib()
- Debug program - program will stop on fib() with no indication why. Suggest indicating function-breakpoints on first line with instructions of impacted functions.
Ex:
Because:
Debugger Configurations
Tasks.json:
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: cl.exe build active file",
"command": "cl.exe",
"args": [
"/Zi",
"/EHsc",
"/nologo",
"/Fe${fileDirname}\\${fileBasenameNoExtension}.exe",
"${file}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$msCompile"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
Debugger Logs
I turned these on, but saw nothing additional when I did so.
Other Extensions
ESP-IDF plugin was installed, but disabled.
Additional Information
This also seems to impact the ESP-IDF VSCode plugin https://github.com/espressif/vscode-esp-idf-extension/issues/1504#issuecomment-2826481537 , so perhaps it's a DAP issue?
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 with the Windows reproduction using the tasks.json configuration: build the simple C program with main() and fib(), set a function breakpoint, and debug it with CL.EXE. Review the debugger behavior and available logs, including the linked ESP-IDF report, then verify that stopping at a function breakpoint provides a visible indication in the text editor of why execution stopped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript, vscode
- Domain
- devtools, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100