I am trying to use VS code in a windows 10 machine to debug a c program.
When I press F5, the debug console, come out the error message below
Warning: Debuggee TargetArchitecture not detected, assuming x86_64.
=cmd-param-changed,param="pagination",value="off"
=cmd-param-changed,param="args",value="2>CON 1>CON <CON"
ERROR: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Error creating process {my program path}\testing.exe, (error 5).
The program {my program path}\testing.exe has exited with code 42 (0x0000002a).
I had try:
- reinstall the MinGW
- reinstall the VS Code(ver 1.53.0)
- Add the MinGW to Environment path
- check other no error computer that our launch.json and task.json file content are the same
the only thing that I found different with the no error computer is the command in terminal
Have error
'c:\Users\{my name}\.vscode\extensions\ms-vscode.cpptools-1.2.0\debugAdapters\bin\WindowsDebugLr=Microsoft-MIEngine-Error-woaq1zfx.ino'
'--pid=Microsoft-MIEngine-Pid-cktvzb1f.ldz'
'--dbgExe=C:\MinGW\bin\gdb.eauncher.exe'
'--stdin=Microsoft-MIEngine-In-ousjkx2v.fa4'
'--stdout=Microsoft-MIEngine-Out-3zwxjow2.lxd'
'--stderr=Microsoft-MIEngine-Error-woaq1zfx.ino'
'--pid=Microsoft-MIEngine-Pid-cktvzb1f.ldz'
'--dbgamming> Exe=C:\MinGW\bin\gdb.exe'
'--interpreter=mi
No error
'c:\Users\{my name}\.vscode\extensions\ms-vscode.cpptools-1.2.0\debugAdapters\bin\WindowsDebugLauncher.exe'
'--stdin=Microsoft-MIEngine-In-dbis1iss.4uo'
'--stdout=Microsoft-MIEngine-Out-2k2qns13.5jp'
'--stderr=Microsoft-MIEngine-Error-ixytwn1h.hzm'
'--pid=Microsoft-MIEngine-Pid-kqpv2wcw.1oc'
'--dbgExe=C:\MinGW\bin\gdb.exe'
'--interpreter=mi'
gdbis very pedantic regarding that it must be in the environment path when you start VSC. Start VSC from a terminal where you know thatgbd(no path) is a recognized commandgdbkeyword, I can enter the gdb, however the error still happen.test____is never a good idea unless you write the unix commandtest