Understanding VS code launch.json file

 I have recently moved to other organization and here my team is extensively using VS code. So, I was assigned a task and after coding it up I was planning to test it. This is the button on which I clicked.

Immediately after that, I start seeing a pop in which VS code asked me setup up a launch.json file in order run my tests. I was little bit confused about what exactly is this launch.json is and why it's needed? I did search for this, and this was the first article to which I found link: Debugging in Visual Studio Code

After reading it up a bit, I found that this is a configuration file needed for running up the tests and currently in my code I haven't configured it. Upon reading more I found that vs code does provide options to run current file but it's better to create a launch.json file to save and configure testing details.
Info: This launch.json file would be created under .vscode folder.

There are quite a lot of launch.json attributes which can be used based upon the requirements:
Debugging in Visual Studio Code also intellisense can also be used to find out the desired supported attributes for the platform.

There is also a subsection related to variable substitution: Debugging in Visual Studio Code
which talk about vs code assigning names to commonly used up paths. I found it quite useful in understanding some of the variables like ${workspacefolder} --> root path of current project, or ${file} --> current open file.

There is also one more subsection for defining up operating system specific properties. 
There was also an example mentioned in this document see screen shot above. It shows that stopOnEntry variable would be true for all platforms except macos.

Further this talks also talks about a lot of advanced vs code topics but let's leave it for another time for now.



Comments

Popular posts from this blog

Kustov query language

Making all service APi's generic

How I learned LINQ query Fundamentals