Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program does not exist #17

Closed
oniledio opened this issue Apr 18, 2016 · 4 comments
Closed

Program does not exist #17

oniledio opened this issue Apr 18, 2016 · 4 comments
Labels

Comments

@oniledio
Copy link

on ubuntu 14.04
when trying to debug, causes this error:
launch: program '/home/leon/visual-studio/a01.cpp' does not exist

@johnkemnetz
Copy link

@Leoer what does your launch.json file look like?

@oniledio
Copy link
Author

oniledio commented Apr 19, 2016

@johnkemnetz

{
"version": "0.2.0",
"configurations": [
{
"name": "C++ Launch (GDB)",
"type": "cppdbg",
"request": "launch",
"launchOptionType": "Local",
"miDebuggerPath": "/usr/bin/gdb",
"targetArchitecture": "x64",
"program": "${workspaceRoot}/a01.cpp",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceRoot}",
"environment": []
},
{
"name": "C++ Attach (GDB)",
"type": "cppdbg",
"request": "launch",
"launchOptionType": "Local",
"miDebuggerPath": "/usr/bin/gdb",
"targetArchitecture": "x64",
"program": "${workspaceRoot}/a01.cpp",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceRoot}",
"environment": [],
"processId": "enter program's process ID"
}
]
}

@johnkemnetz
Copy link

@Leoer My guess is that a01.cpp is the file you want to build into an executable program and debug, yes? If so, you'll need to set up a Tasks.json file that builds the .cpp into an executable program (eg. using gcc) then reference the executable program name (eg. "a.out") from the launch.json "program" property. See the last paragraph here:http://code.visualstudio.com/docs/languages/cpp#_debuggingfor more info on that.

@manoharreddyporeddy
Copy link

Spend a lot of time

Ideally vs-code can give prompts for each installation, etc. automatically, so that it wont be so long procedure for beginners.

I wrote how to run C++ in vs code in a very detailed manner here:
https://stackoverflow.com/a/50658089/984471

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants