System information:
-OS: Windows 10
-VS code version: 1.32.3
-Extension: C/C++, version 0.22.1
-Compiler/debugger version: MinGW.org GCC-8.2.0-3
Bug description:
When launching the debugger, configured in mode "gdb", the blue bar is loading forever and nothing happens. I already tried to enable logging but nothing is output to the VS code debug console. However when setting externalConsole to false, the following line is printed in the integrated terminal:
env "c:\Users\brunn\.vscode\extensions\ms-vscode.cpptools-0.22.1\debugAdapters\bin\WindowsDebugLauncher.exe" --stdin=Microsoft-MIEngine-In-fyz0vlaa.gej --stdout=Microsoft-MIEngine-Out-0aiqcb4f.wbn --stderr=Microsoft-MIEngine-Error-gvbsagt3.yu1 --pid=Microsoft-MIEngine-Pid-aqbc4pf3.3dh --dbgExe=C:/Data/Programmes/MinGW/bin/gdb.exe --interpreter=mi
However, this command never terminates and it seems like something goes wrong during the execution of that command.
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/main.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:/Data/Programmes/MinGW/bin/gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": false
}
]
}
The env "c:\Users\brunn\.vscode\extensions\ms-vscode.cpptools-0.22.1\debugAdapters\bin\WindowsDebugLauncher.exe" --stdin=Microsoft-MIEngine-In-fyz0vlaa.gej --stdout=Microsoft-MIEngine-Out-0aiqcb4f.wbn --stderr=Microsoft-MIEngine-Error-gvbsagt3.yu1 --pid=Microsoft-MIEngine-Pid-aqbc4pf3.3dh --dbgExe=C:/Data/Programmes/MinGW/bin/gdb.exe --interpreter=mi command is only used when externalConsole is set to false. If it still hangs while set to true, theres another issue.
Can you enable logging and share the logs here?
Does running C:/Data/Programmes/MinGW/bin/gdb.exe also start GDB?
Here is the output in the debug console when enabling logging:
Running executable
[New Thread 9652.0x1710]
[New Thread 9652.0x28cc]
error return ../../gdb-7.6.1/gdb/windows-nat.c:1275 was 5
And to answer your second question, yes, the path you gave me successfully launches GDB.
Have the same problem here.
-OS: Windows 10 [18362.30]
-VSCode Version: 1.33.0
-Extension: C/C++, version 0.22.2-insiders
-Compiler/debugger version: 7.3.0 (x86_64-win32-seh-rev0, Built by MinGW-W64 project)
Here is show in PS console:
& 'c:\Users\thelastline\.vscode\extensions\ms-vscode.cpptools-0.22.2-insiders\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdin=Microsoft-MIEngine-In-32u4u1hm.n1x' '--stdout=Microsoft-MIEngine-Out-1h4dx2de.qce' '--stderr=Microsoft-MIEngine-Error-cde2kxmr.24f' '--pid=Microsoft-MIEngine-Pid-v0jahlrg.d5x' '--dbgExe=D:\BuildTools\mingw-w64\mingw64\bin\gdb.exe' '--interpreter=mi'
And it never terminate, programs(need debug) doesn't launch, too.
Run D:\BuildTools\mingw-w64\mingw64\bin\gdb.exe manually and it's looks good.
Try to set externalConsole to true, still hang and can't debug programs.
Enable logging with Here, get nothing.
update: I disable unicode support on Windows codepage settings, now it works. Maybe like Issue 1527.
@thelastlin thank you
Have the same problem here.
-OS: Windows 10 [18362.30]
-VSCode Version: 1.33.0
-Extension: C/C++, version 0.22.2-insiders
-Compiler/debugger version: 7.3.0 (x86_64-win32-seh-rev0, Built by MinGW-W64 project)Here is show in PS console:
& 'c:\Users\thelastline\.vscode\extensions\ms-vscode.cpptools-0.22.2-insiders\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdin=Microsoft-MIEngine-In-32u4u1hm.n1x' '--stdout=Microsoft-MIEngine-Out-1h4dx2de.qce' '--stderr=Microsoft-MIEngine-Error-cde2kxmr.24f' '--pid=Microsoft-MIEngine-Pid-v0jahlrg.d5x' '--dbgExe=D:\BuildTools\mingw-w64\mingw64\bin\gdb.exe' '--interpreter=mi'And it never terminate, programs(need debug) doesn't launch, too.
RunD:\BuildTools\mingw-w64\mingw64\bin\gdb.exemanually and it's looks good.
Try to set externalConsole to true, still hang and can't debug programs.Enable logging with Here, get nothing.
===============
`
update: I disable unicode support on Windows codepage settings, now it works. Maybe like Issue 1527.
how did you do that?
Have the same problem here.
-OS: Windows 10 [18362.30]
-VSCode Version: 1.33.0
-Extension: C/C++, version 0.22.2-insiders
-Compiler/debugger version: 7.3.0 (x86_64-win32-seh-rev0, Built by MinGW-W64 project)
Here is show in PS console:& 'c:\Users\thelastline\.vscode\extensions\ms-vscode.cpptools-0.22.2-insiders\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdin=Microsoft-MIEngine-In-32u4u1hm.n1x' '--stdout=Microsoft-MIEngine-Out-1h4dx2de.qce' '--stderr=Microsoft-MIEngine-Error-cde2kxmr.24f' '--pid=Microsoft-MIEngine-Pid-v0jahlrg.d5x' '--dbgExe=D:\BuildTools\mingw-w64\mingw64\bin\gdb.exe' '--interpreter=mi'And it never terminate, programs(need debug) doesn't launch, too.
RunD:\BuildTools\mingw-w64\mingw64\bin\gdb.exemanually and it's looks good.
Try to set externalConsole to true, still hang and can't debug programs.Enable logging with Here, get nothing.
`
update: I disable unicode support on Windows codepage settings, now it works. Maybe like Issue 1527.how did you do that?
just like this
I had this issue, and it turned out to be caused by having the NoMachine server (https://www.nomachine.com) installed on my Windows box. Once I uninstalled NoMachine, I could suddenly debug again.
Perhaps something about how NoMachine hooks into processes and windows was interfering with the STDOUT/STDERR redirection behaviour in VSCode?
Most helpful comment
Have the same problem here.
-OS: Windows 10 [18362.30]
-VSCode Version: 1.33.0
-Extension: C/C++, version 0.22.2-insiders
-Compiler/debugger version: 7.3.0 (x86_64-win32-seh-rev0, Built by MinGW-W64 project)
Here is show in PS console:
And it never terminate, programs(need debug) doesn't launch, too.
Run
D:\BuildTools\mingw-w64\mingw64\bin\gdb.exemanually and it's looks good.Try to set externalConsole to true, still hang and can't debug programs.
Enable logging with Here, get nothing.
update: I disable unicode support on Windows codepage settings, now it works. Maybe like Issue 1527.