xorg
xorg

Reputation: 317

How do I open the 'launch.json' file in Visual Studio Code?

I am a new programmer that started learning Python, but there's something bothering me which I'd like to change.

As I've seen that it is possible to remove the unwanted path from the terminal when executing code, I cannot figure out how to access the Visual Studio Code launch.json file and all of the explanations on Google are quite confusing.

Upvotes: 17

Views: 55762

Answers (2)

Brad Parks
Brad Parks

Reputation: 72283

Note that if Visual Studio Code hasn't created a launch.json file for your project yet, do the following:

  • Click the Run | Add Configuration menu option, and one will automatically be generated for you, and opened in the editor.

NOTE: You have to have a "Folder" open, for this to work. File | Open Folder...

Upvotes: 15

leminhnguyen
leminhnguyen

Reputation: 1698

In Visual Studio Code, use shortcut Ctrl + Shift + P to open the Command Palette and type Open launch.json. And it will open the launch.json file for you. If you also can't open launch.json then try the way below.

Check if the .vscode folder exists in the root folder. If not, then create a new one and create file launch.json in that. Now you have launch.json for your workspace and you can configure your project.

Enter image description here

Upvotes: 9

Related Questions