Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"PDB format is not supported" with .NET portable debugging information

The last couple of days I've been hunting down a problem - with the conclusion:

My Visual Studio 2017 debugger can't work with PDBs in "portable" format in .NET Framework projects.

With portable format I mean going to a project's settings, then to Build -> Advanced and then selecting portable under Debugging information.

When I start debugging a .NET Framework project built like this, breakpoints don't get hit.

The breakpoint will not currently be hit. No symbols have been loaded for this document.

When I pause the debugger and look for the reason why it didn't load the symbols, it says (under Symbol load information):

PDB format is not supported

I can reproduce this with any .NET Framework project. The target framework doesn't seem to matter. I tried .NET 4.5.2 and 4.6.2.

It works fine, though, for .NET Core projects.

Now, the strange thing is that the exact same project works fine on another computer.

So, it seems that my computer is missing something or has something misconfigured. But my Google search didn't turn up anything. Any ideas how to fix this problem?

like image 381
Sebastian Krysmanski Avatar asked May 31 '17 11:05

Sebastian Krysmanski


1 Answers

You are probably using the wrong debugging engine.

Navigate: Tools > Options > Debugging > General

Ensure that the "Use Managed Compatibility Mode" is not ticked.

like image 145
Adam Schiavone Avatar answered Sep 22 '22 08:09

Adam Schiavone