简体   繁体   中英

Add debug symbols for .NET 3.5 Debugging in Visual Studio 2013

I have a Unity application and a C# DLL, created by Visual Studio 2013, that I want to debug. I do this by going to DEBUG > Attach to Process inside Visual Studio 2013, and if I choose Native code, I can set breakpoints for C++ code and etc. However, when I choose the option for .NET 3.5, it says that the breakpoint will never be reached as the symbols have not been loaded.

How do I load debug symbols for .NET 3.5 for Visual Studio 2013?

Please have a look at the below MSDN links

https://docs.microsoft.com/en-us/visualstudio/debugger/specify-symbol-dot-pdb-and-source-files-in-the-visual-studio-debugger?view=vs-2017

https://docs.microsoft.com/en-us/visualstudio/debugger/how-to-debug-dotnet-framework-source?view=vs-2017

You can load the symbols from pdf file and making configurations in pdb file you can manage the symbols while debugging the application.

Ok,

The answer is simple, you have a dll, debug symbols are .pdb files. You need to open and build c# solution (class library) in visual studio and look in the output directory of the project, usualy bin->debug. Get the pdb and store them somewhere. Then when you run your unity applicatio, you use visual studio (can be any version of visual doesnt matter), attach to process, but make sure the pdb's you saved have been loaded into visual studio by following the microsoft documentation above.

If you don't have the library's symbols file, you can decompile the library with the free decompiler dotPeek and attach Visual Studio to the dotPeek's symbols server .

Then disable Enable Just My Code in Visual Studio's debugging option. Remember to enable it again, when you're done, because it hurts the performance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM