microsoft / microsoft/vscode-cpptools
Breakpoints are not bound when attaching to process under Windows
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 10
- VS Code: 1.8.1.0-insider
- C/C++ extension: 1.16.3
- GDB version: 11.2
Bug Summary and Steps to Reproduce
- Set Breakpoint
- Start Process
- Attach to Process
- Wait for Breakpoint to be bound
Debugger Configurations
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Attach Matlab",
"type": "cppdbg",
"request": "attach",
"program": "C:/Program Files/MATLAB/R2022b/bin/win64/MATLAB.exe",
"MIMode": "gdb",
"miDebuggerPath": "gdb",
"setupCommands": [
{
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
},
{
"text": "handle SIGSEGV nostop"
}
]
}
]
}
Debugger Logs
-
Other Extensions
No response
Additional Information
I am aware of the "known limitations" under https://code.visualstudio.com/docs/cpp/cpp-debug#_known-limitations. However, as already described under #595 , and also described by someone else on stackoverflow, when using gdb via the commandline it can halt the process it is attached to. So the statement under "known limitations" is not as absolute as it seems.
I open this new issue, because my comment in the closed #595 did not get any attention.
What is the difference in invoking gdb via VSCode and via commandline? Why does one not be able to halt the attached process and the other can?
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 posted cppdbg attach configuration and compare VS Code's attach behavior with command-line GDB on Windows 10. Review the known limitations and the prior issue #595, then determine whether breakpoints can be bound after attaching; document the result if the behavior remains a limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100