[tools] vscode debug report G + +. Exe no such file or directory fatal error no input files

Yesterday, we set up the debugging environment of VSCode Cpp breakpoint. It could still run at noon, but it started to report errors in the evening. According to the environment set up by the article I published, when I tried to debug by pressing F5, the error was reported as follows:

watch VSCode integrated in the TERMINAL error
g + +. The exe: error: e: ProjectsVSCodeCppTest5srctest. CPP: No to the file or directory
here's e: ProjectsVSCodeCppTest5srctest. CPP should actually be e: \ Projects \ VSCode \ CPP \ Test5 \ SRC \ test CPP.
but is resolved to an address without a slash, so the compiler cannot find the file.
Turns out, the reason for this error parse is because. Different terminals parse slashes and backslashes differently. Yesterday, after configuring the environment, I happened to find that VS Code integrated terminal itself, and also integrated all terminals in the environment, including PowerShellCommand Prompt (CMD) , and Git Bash. When using the shortcut key CTRL + shift + ~ to open the terminal, click the drop-down arrow on the right to select the default open terminal.

click Select Default Shell, all shells in the environment will pop up at the top of the interface for selection.

select Git Bash and F5 debug Cpp code, it will report the opening error. When you select PowerShell or Command Prompt, you are ready to debug normally!
Note that the default shell cannot be selected by clicking the drop-down menu when
error is reported. You need to open a terminal by yourself with the shortcut key.

Read More: