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
debugger quit when setting break point or switching to another thread on ubuntu 22.04 (WSL2) #9253
Comments
This seems to be an error with gdb under mi mode. From the logs:
|
I can replicate the same issue using GDB in VSCode in Ubuntu 22.04 natively installed. Before I was running same project in Ubuntu 20.04 and this was not happening. When a breakpoint is set in the main thread (Thread 1), everything runs flawlessly but when the breakpoint happens to be in a different thread I get the same error as OP:
|
I have been able so solve it, and now I can debug threaded applications with GDB 12.1 and Ubuntu 22.04: https://www.sourceware.org/gdb/
|
Excellent! Thank you very much, this solved my debug issues as well. I downloaded the pre-built package from launchpad |
Environment
Version: 1.66.2 (user setup)
Commit: dfd34e8260c270da74b5c2d86d61aee4b6d56977
Date: 2022-04-11T07:46:01.075Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Windows_NT x64 10.0.22000
C/C++ v1.9.8
GNU gdb (Ubuntu 12.0.90-0ubuntu1) 12.0.90
Copyright (C) 2022 Free Software Foundation, Inc.
Bug Summary and Steps to Reproduce
Bug Summary:
VC code debugger quits immediately after start debugging with:
Aborted (core dumped)
[1] + Aborted (core dumped) "/usr/bin/gdb" --interpreter=mi --tty=${DbgTerm} 0<"/tmp/Microsoft-MIEngine-In-ns2vuk2i.3xq" 1>"/tmp/Microsoft-MIEngine-Out-br5vdh4k.oln"
Steps to reproduce:
Install Ubuntu22.04 on WSL2 on Windows 11
build main.cpp (see attached repro.zip) via
g++ -g -O0 main.cpp
set breakpoint on line 8
void threadFunction()
{
std::this_thread::sleep_for(50000ms); <--- here
}
start debugging, and it will core dump.
Note, without setting breakpoint, if you start debugging, and hit pause, then switch the thread to the 2nd thread, it will also quit.
note that using console gdb it is fine
repro.zip
.
Debugger Configurations
Debugger Logs
Other Extensions
no other extensions were enabled.
Additional Information
repro.zip
repro.log
The text was updated successfully, but these errors were encountered: