Can Visual Studio Code use GDB to attach to process without the "Program" property?
yakamoz423 opened this issue · comments
Environment
- OS and version: Win11 22631.3007
- VS Code: 1.89.1
- C/C++ extension: 1.20.5
- OS and version of remote machine (if applicable):
- GDB / LLDB version: 14.1
Bug Summary and Steps to Reproduce
Bug Summary:
Just this post: https://stackoverflow.com/questions/52981423/can-visual-studio-code-use-gdb-to-attach-to-process-without-the-program-proper
The program
field must be filled in, which means I cannot just create a single attach debugging
configuration to debug various different programs. Actually GDB can automatically handling this according to the specified PID.
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",
"type": "cppdbg",
"request": "attach",
"program": "xxx",
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
}
]
}
Debugger Logs
No need
Other Extensions
No response
Additional Information
No response
@yakamoz423 This is already tracked by #5713