-2

How to change this path in the terminal:

(THE PATH THAT SHOWN IN THE TERMINAL)

to the actual path below?

(THE REAL PATH)

This causes that I couldn't run my code.

This problem prevents me to try my first line of code.

Peter Macej
  • 4,831
  • 22
  • 49
  • learn how to use the terminal for the OS you use, learn the shell commands needed to change the directory – rioV8 Jul 04 '23 at 17:33
  • Does this answer your question? [how to change directory using Windows command line](https://stackoverflow.com/questions/17753986/how-to-change-directory-using-windows-command-line) – starball Jul 04 '23 at 18:42

1 Answers1

0

Usually, when we first open vscode, we need to set the workspace (File -> Open Folder).

enter image description here

When you set up the workspace, terminal will default to setting the workspace as the area for executing files.

Another way is to use debug mode. Adding "program": "${file}" to your launch.json means debugging current file.

If you only want to modify the current path in the terminal, VSCode is just a code editor, and the operations in the terminal are exactly the same as using the shell normally. You can run command cd D:\programming\0\installing to achieve it.

MingJie-MSFT
  • 5,569
  • 1
  • 2
  • 13