Coming soon!

Debugging .NET Core Applications in Visual Studio Code

I've been using Visual Studio Code to develop my new .NET Core apps, and I've been running into a head-scratching issue when trying to debug my code. When setting a breakpoint and running the application, VSCode would tell me that it could not find my symbol files (PDB files). So

  • vscode
  • dotnetcore
  • aspnetcore
  • debugging

By Tim Sommer · 8/29/2016 2:25:46 PM

I've been using Visual Studio Code to develop my new .NET Core apps, and I've been running into a head-scratching issue when trying to debug my code.

When setting a breakpoint and running the application, VSCode would tell me that it could not find my symbol files (PDB files). So the application ran fine, but I couldn't debug my code, at all..
I manually checked the locations of the PDB files and they where all there. For the life of me, I couldn't understand what I was doing wrong.

This problem occurred every time, even with a simple .NET Core app that was created with dotnet new.

I searched the web for hours and hours, and apparently there is a very simple solution.

.NET Core introduces a new symbol file format called portable PDBs. Unlike traditional PDBs which are Windows-only, portable PDBs can be created and read on all platforms. The new .NET Core debugger for Visual Studio Code only supports this new portable format.

So all you have to do is navigate to the project.json file and add "debugType": "portable" to 'buildOptions'.
Once I added that single configuration option I no longer received warnings and my breakpoints were hit wen running my .NET Core app in Visual Studio Code.

Enjoy!


  • vscode
  • dotnetcore
  • aspnetcore
  • debugging

By Tim Sommer · 8/29/2016 2:25:46 PM

Share this blogpost

Looking for talent?

Fill in the form below and we’ll get back to you as soon as possible.

Oops. You seem to have written your full name in invisible ink. Please enter it so we can read it. Oops. You seem to have written your company in invisible ink. Please enter it so we can read it. It seems your e-mail doesn’t exist. Please enter a real one so we can contact you. Oops. You seem to have written your telephone in invisible ink. Please enter it so we can read it.