Sanket R
Sanket R

Reputation: 57

Launch: program does not exist in Visual Studio Code

While debugging a simple C program, I always get an error saying "Launch: program 'XXX' does not exist"

Note: I already have my compiler - GCC installed & I'm using Ubuntu operating system.

Worspace of my Visual Studio Code displaying Error My launch.json file

Upvotes: 3

Views: 10155

Answers (1)

Rohan Bari
Rohan Bari

Reputation: 7726

Replace the launch configuration from:

"program": "${workspaceRoot}/helloworld"

with:

"program": "${fileDirname}/helloworld"

This should fix your problem.

Important: Ensure the compiled filename in tasks.json is equivalent to your "program"'s filename.

Upvotes: 2

Related Questions