0

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:

  1. reinstall the MinGW
  2. reinstall the VS Code(ver 1.53.0)
  3. Add the MinGW to Environment path
  4. 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'
4
  • gdb is very pedantic regarding that it must be in the environment path when you start VSC. Start VSC from a terminal where you know that gbd (no path) is a recognized command Commented Feb 7, 2021 at 5:10
  • Thanks for comment. I restart my computer, and start the gdb.exe with only gdb keyword, I can enter the gdb, however the error still happen. Commented Feb 7, 2021 at 7:33
  • what if you start gdb yourself from the command line to debug the executable, calling your program test____ is never a good idea unless you write the unix command test Commented Feb 7, 2021 at 10:31
  • Sorry, I found the reason, the MCAfee recognize the output as virus. Problem solve after I uninstall MCAfee. Thank you for time!!!! Commented Feb 7, 2021 at 10:46

1 Answer 1

0

I found the reason, the MCAfee recognize the output as virus. Problem solve after I uninstall MCAfee

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.