VS doesn't find *.pdb files; no symbols loaded for debugging, breakpoints fail
Author: superticker
Creation Date: 3/24/2019 6:31 PM
profile picture

superticker

#1
I'm trying to create VS debugger breakpoints in my strategy code, but the debugger grips it cannot find the *.pdb symbolic definitions, which are clearly present in the WL install directory. In other words, my breakpoints are being ignored. How do I get the debugger to load all my *.pdb files?

On an unrelated issue, is it "possible" to debug a DLL subroutine code library from a strategy residing in the WL editor? I'm gathering the main strategy must be in a DLL code library so the debugger can find the DLL code library being called from the main strategy for debugging. Can you confirm?
profile picture

Eugene

#2
It's amazing to see this question being raised again and again despite this ain't no Wealth-Lab's fault. I've searched the forum to point you at this best matching topic:

Breakpoint not hit when debugging with Visual Studio

The referred Components DLL/PDB look suspiciously outdated but I don't think that deleting them manually prior to rebuild would help as the symbols which fail to load still belong to the Strategies assembly. Nonetheless try to follow suggestions in the topic and/or everything that StackOverflow has to offer.
profile picture

superticker

#3
Well, this is a little more complicated and I don't have it all figured out. Apparently, to keep the code terse, the symbols aren't loaded automatically for a "Release" build if "Just my code" is set. I'm not sure where that's set, but symbols have to be loaded manually for each debugging session if "Just my code" is the setting. To manually load them, while in debugging mode, go into Debug > Windows > Modules and configure which symbol files need to be loaded.

Now I need to figure out how to get the "Just my code" setting turned off so I'm not manually loading symbol files all the time. The symbols do make the code base larger (and slower), so turning this off isn't necessarily a good thing. If you're doing a "Debug" build, the rules would be different. The settings for the "Debug" build and "Release" build are independent.
profile picture

Eugene

#4
Sure they are different. Didn't realize you were debugging a Release build. Frankly I don't do it usually. Choose the Debug configuration, rebuild and it should be fine.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).