Visual Studio Code: Debugging C# code

One of my reader asked how to debug C# code using Visual Studio Code. This blog post provides simple step by step guide to C# debugging in Visua Studio Code. In short – C# extension for Visual Studio Code must be installed. Works on Windows, Linux and Apple.

  1. Open extensions by clicking on last icon of icons pane in left:
      Visual Studio Code: Install C# plug-in
  2. After installing C# extension Visual Studio Code asks if it can reload window to activate the extension.
      Visual Studio Code: Activate C# extension
  3. Check output window and wait until all packages are downloaded.
      Visual Studio Code: Downloading packages
  4. Set break-point somewhere in code and click green arrow on toolbar after DEBUG
      Visual Studio Code: Hit da breakpoint!

Screenshot above shows that there are some familiar things from Visual Studio available: Variables, watch, and callstack panes. Debug console shows debug messages by debugger and code.

See also

3 thoughts on “Visual Studio Code: Debugging C# code

Leave a Reply

Your email address will not be published. Required fields are marked *