Debugging C with VS Code

1

I've trouble setting up VS Code to debug C though I've followed the instructions here: How do I set up VSCode to compile C++ code? ( mx0's answers ). While runnig the built.bat task, it shows this in the output:

'Build.bat' is not recognized as an internal command Or external, an executable program or a batch file.

Furthermore, debugging fails and it shows this error:

Unknown Error: 0x800700c1

My launch.json file looks like this:

{
    "name": "(Windows) Launch",
    "type": "cppvsdbg",
    "request": "launch",
    "program": "${workspaceRoot}\\C\\test.c",
    "args": [],
    "stopAtEntry": false,
    "cwd": "${workspaceRoot}",
    "environment": [],
    "externalConsole": true
},
{
    "name": "(Windows) Attach",
    "type": "cppvsdbg",
    "request": "attach",
    "processId": "${command:pickProcess}"
}

And, my task.json looks like this :

{  
   // See https://go.microsoft.com/fwlink/?LinkId=733558
   // for the documentation about the tasks.json format
   "version": "0.1.0",
   "windows": {
      "command": "build.bat",
      "isShellCommand": true,
      "showOutput": "always"
   }
}

Any help would be much appreciated.

c
json
visual-studio-code
asked on Stack Overflow Aug 8, 2017 by DijkstraFTW • edited Dec 5, 2017 by dbush

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0