-
Notifications
You must be signed in to change notification settings - Fork 1.6k
GDB not able to attach to a running process from VS Code while using cpptools-extension-pack & cpptools. #13123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@ScanderDevMode gdb attach works for me. Can you try removing |
Hi Sean, I have already tried those things. Let me upload a small clip, giving a demo of whats going on. Also, I can manage a screen share if you like. Let me know, if you want to. Thanks. |
I have the same issue. GDB won't attach from VSCode, but works perfectly from a standalone terminal (RHEL7.9). VSCode: 1.95.3 As the original poster noted, enabling logging doesn't help. No logs in Debug console. |
These both look like the same issue as #13219. Since this issue was opened first, we hadn't identified the root cause yet. Closing as duplicate. |
An update: Although the VS-Code Github community said that this is caused by the extension, this also happens with other cpp extensions which lets you debug, example "DAP". So is it an extension caused issue, or VS-Code caused issue. |
Solution : Use the version 1.22.11 of cpp tools extension. That one was the last one available which worked on CentOS7, since it was using the older GLIBC lib. Steps to Downgrade:
Posting this here if anyone stumbles here. |
Environment
VS Code version: Code 1.96.2 (fabdb6a30b49f79a7aba0f2ad9df9b399473380f, 2024-12-19T10:22:47.216Z)
OS version: Linux x64 3.10.0-1160.119.1.el7.x86_64 snap
Modes:
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: disabled_off
webnn: unavailable_software
Extensions (11)
(1 theme extensions excluded)
A/B Experiments
Bug Summary and Steps to Reproduce
Bug Summary:
Hi,
While gdb works fine in the terminal [even the one inside visual code] and can attach to the running process fine, with the command 'gdb ./demo 10113' [gdb 'file' 'PID'].
It cannot be attached to a running process from Visual Studio Code.
It is starting and then closing, with no logs in the Debug console.
I am using centos7, and besides this, VS Code is running fine, and on its own, gdb is also working fine.
I may be going wrong somewhere, but I tried to dig in and found nothing.
Steps to reproduce:
Help will be appreciated.
Thanks and regards,
Amit Kr Das.
Debugger Configurations
Debugger Logs
No log is getting logged in the Debug Console.
Other Extensions
Extensions (11)
(1 theme extensions excluded)
Additional Information
The issue was first raised in the VS Code git Repository, which was checked by Rob Lourens [email protected],
and concluded that this issue belongs to the cpptools extension, rather than VSCode itself.
The previous issue can be viewed at: microsoft/vscode#237283
The text was updated successfully, but these errors were encountered: