Reputation: 316
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?
Upvotes: 5
Views: 1559
Reputation: 1449
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.
Upvotes: 0
Reputation: 1360
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.
Upvotes: 0
Reputation: 903
Please have a look at the below MSDN links
https://learn.microsoft.com/en-us/visualstudio/debugger/specify-symbol-dot-pdb-and-source-files-in-the-visual-studio-debugger?view=vs-2017
https://learn.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.
Upvotes: 1