Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 912
Sanket R Avatar asked Feb 13 '26 11:02

Sanket R


1 Answers

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.

like image 135
Rohan Bari Avatar answered Feb 16 '26 05:02

Rohan Bari



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!