Vscode tips on the use of launch.json

Friends who use vscode often encounter this problem. If there is no configuration file (launch.json, tasks.json, setting.json, etc.) in the current directory, the code cannot be compiled and run. Is there a way to solve this problem? The answer is yes.

First open any folder that contains the .vscode configuration folder, then open the file in any location that needs to be compiled in vscode (note that it is not a folder), and then you can compile and run. Is it very simple~

What if you have to open a folder (such as a project)?

Method 1: Copy the original configuration file. This method is simple and rude, and the shortcomings are also obvious: every new project has to be copied once, which is too annoying.

Method 2: Use global configuration. This method is slightly more troublesome, but it can be done once and for all. For the specific operation process, please see: https://blog.csdn.net/qq_45975757/article/details/109037302

If you think it is easy to use, just give it a thumbs up. Your encouragement is the motivation of the author~

Guess you like

Origin blog.csdn.net/qq_45975757/article/details/109046989