Closed mtrutledge closed 5 years ago
NOTE: If you build the csproj file from within Visual Studio the PDBs generated allow attaching to the debugger properly.
Moving a comment from another issue to this issue. @ahoefling said: "I did a quick search and I think I found something that may be helpful in our research. It appears there is full .NET Framework debugger support in VS Code (I had no idea). The problem is you need to specify your PDB as portable. My guess is we aren't passing that in the msbuild arguments like you mentioned above.
Take a look at this thread which I found helpful in this topic
OmniSharp/omnisharp-vscode#813 "
In the new csproj files DebugType is set to Portable by default since VS Code and the omni sharp plugin want to use those for debugging. If using full visual studio and Portable is not working the project settings can be changed to full.
Portable PDBs can be read on any operating system, but there are a number of places where they aren't supported yet. Here are a few –
- Older versions of the Visual Studio debugger (versions before VS 2015 Update 2)
- Applications targeting .NET Framework 4.7.1 or earlier1: printing stack traces with mappings back to line numbers (such as in an ASP.NET error page). The name of methods is unaffected, only the source file names and line numbers are unsupported.
- C# Code analysis (aka FxCop), note that this doesn't apply to Roslyn Analyzer
- Symbol server (ex: SymbolsSource.org)
- Running post-compilation build step that consumes or modifies the PDB using older versions of tools such as CCI, CodeContracts.
- Using .NET decompilers such as ildasm or .Net reflector and expecting to see source line mappings or local parameter names
- MS DIA-based tools such as WinDBG.
Over time we plan to shrink this list of non-supported scenarios so that portable PDB can become the default choice for most usage needs.
1. When running on .NET Framework 4.7.2 with an app that targets earlier .NET Framework versions we anticipate having an opt-in configuration switch as an additional mechanism to enable support for older applications↩
Describe the bug
When you run
npm run build
and the gulp task triggers msbuild the resulting PDB files generated do not allow an instance of Visual Studio to attach the debugger properly.To Reproduce
Steps to reproduce the behavior:
npm run build
Expected behavior
The PDB generated from the command line should allow Visual Studio to attach the debugger and hit the breakpoint properly