{"id":12842,"date":"2016-03-10T07:00:00","date_gmt":"2016-03-10T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/?p=12842"},"modified":"2019-02-14T17:36:17","modified_gmt":"2019-02-15T01:36:17","slug":"experimental-net-core-debugging-in-vs-code","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/experimental-net-core-debugging-in-vs-code\/","title":{"rendered":".NET Core Debugging in VS Code"},"content":{"rendered":"<p>The <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode.csharp\">C# extension for Visual Studio Code<\/a> offers powerful editing and debugging support for <a href=\"https:\/\/microsoft.com\/net\/core\">.NET Core applications<\/a> on Windows, Mac, and Linux, including:<\/p>\n<ul>\n<li>Line by line code stepping  \n<li>Breakpoints (including conditional and function breakpoints)  \n<li>Variable inspection  \n<li>Multi-threaded debugging support  \n<li>Call Stacks  \n<li>Debug console window <\/li>\n<\/ul>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/vsc1.jpg\"><img decoding=\"async\" title=\"vsc\" style=\"border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px\" border=\"0\" alt=\"vsc\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/03\/vsc_thumb1.jpg\" width=\"884\" height=\"567\"><\/a><\/p>\n<h3>Getting started<\/h3>\n<p>To get started you will need to do a few things (<a href=\"https:\/\/aka.ms\/vscclrdebugger\" target=\"_blank\">see our GitHub page for complete instructions<\/a>)<\/p>\n<ul>\n<li><a href=\"https:\/\/www.microsoft.com\/net\/core\" target=\"_blank\">Install .NET Core <\/a> \n<li><a href=\"https:\/\/code.visualstudio.com\/\" target=\"_blank\">Install Visual Studio Code<\/a>  \n<li><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode.csharp\" target=\"_blank\">Install the Visual Studio Code C# extension<\/a> <\/li>\n<\/ul>\n<h3>Working with Console apps<\/h3>\n<p>If you are working with a console application, by default the console output will appear in Visual Studio Code&#8217;s Debug Console window. In order to create a separate console\/terminal window, change the &#8220;externalConsole&#8221; property in the generated &#8220;launch.json&#8221; file to <em>true <\/em>(launch.json is located in the .vscode folder placed in the root of your project).<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/image1039.png\"><img decoding=\"async\" title=\"image\" style=\"border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/03\/image_thumb893.png\" width=\"606\" height=\"250\"><\/a><\/p>\n<h3>Attach Debugging<\/h3>\n<p>The C# debugger supports attaching to processes. To do this, switch to the Debug tab, and open the configuration drop down and select &#8220;.NET Core Attach&#8221;. When you click the Start debugging button (or press F5) UI will appear to select the process.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/image1040.png\"><img decoding=\"async\" title=\"image\" style=\"border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/03\/image_thumb894.png\" width=\"269\" height=\"82\"><\/a><\/p>\n<h3>Limitations<\/h3>\n<p>There are currently some features you might be used to in the Visual Studio IDE that we don\u2019t have in Visual Studio Code yet.&nbsp; These include:<\/p>\n<ul>\n<li>Edit &amp; Continue<\/a> (the ability to modify code and have the changes applied while debugging)  \n<li><a href=\"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2013\/10\/10\/tracepoints\/\">TracePoints <\/a> \n<li><a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/09yze4a9(v=vs.100).aspx\">Set Next Statement<\/a> <\/li>\n<\/ul>\n<h3>What else can you configure?<\/h3>\n<p>Once you install and configure the extension you will have the basic debugging experience describe above, but there is much more you can configure using the launch.json file.&nbsp; For complete instructions see <a href=\"https:\/\/aka.ms\/vscclrdebugger\">our GitHub page<\/a><\/p>\n<h2>Send us your feedback<\/h2>\n<p>As always we welcome your feedback. Tell us what you like and what you don\u2019t like, tell us which features you are missing and which parts of the workflow work or don\u2019t work for you. You can do this by <a href=\"https:\/\/github.com\/OmniSharp\/omnisharp-vscode\/issues\" target=\"_blank\">submitting issues on our Github page<\/a> or <a href=\"https:\/\/twitter.com\/vs_debugger\" target=\"_blank\">contacting us via Twitter.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The C# extension for Visual Studio Code offers powerful editing and debugging support for .NET Core applications on Windows, Mac, and Linux, including: Line by line code stepping Breakpoints (including conditional and function breakpoints) Variable inspection Multi-threaded debugging support Call Stacks Debug console window Getting started To get started you will need to do a [&hellip;]<\/p>\n","protected":false},"author":68,"featured_media":45953,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,225],"tags":[],"class_list":["post-12842","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","category-git"],"acf":[],"blog_post_summary":"<p>The C# extension for Visual Studio Code offers powerful editing and debugging support for .NET Core applications on Windows, Mac, and Linux, including: Line by line code stepping Breakpoints (including conditional and function breakpoints) Variable inspection Multi-threaded debugging support Call Stacks Debug console window Getting started To get started you will need to do a [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/12842","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=12842"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/12842\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/45953"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=12842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=12842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=12842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}