top of page

Getting started | Configure VS Code to debug DotNetCore applications

Create a simple "dotnet new webapi" in VS Code project with some trivial extra logic. Following is what my code structure in VS Code looks like -














Open the command pallete (Ctrl+Shift+P) and use the option ".NET: Generate Assets for Build and Debug". This creates two files, "launch.json" and "tasks.json" within a .vscode folder like below.

















Open "launch.json" and click on "Add Configuration". Select ".NET: Launch Executable file (Console)".







Change the settings in ".NET Core Launch (console)" section of "launch.json" for "program" key with the correct relative path of project DLL. Also, change "console" to "integratedTerminal". In my case, it looks like below -






Select ".NET Core Launch (console)" in the "Run and Debug" option of VS Code add breakpoint where you need.

Hit Run .... and that's all you need ! Happy debugging!


2 views0 comments

Comments


bottom of page