Comments
3 comments
-
The first warning is not a problem. The system is trying to warn you (correctly) that the pdb it generated isn't loaded into the process being debugged. However, as you say, you've manually copied this pdb to the target machine and it has been loaded correctly.
The inability to see the local variables is most likely due to the optimization the clr is doing - we supply the pdb file and then the debugger works with the clr to get the values without any intervention on our part. If you view Debug/Modules you'll probably see that the module is optimized. You can re-ngen a module with an ini file present to make it more debuggable - see, for example, http://msdn.microsoft.com/en-us/library/9dd8z24x.aspx -
Clive Tong wrote:The first warning is not a problem. The system is trying to warn you (correctly) that the pdb it generated isn't loaded into the process being debugged. However, as you say, you've manually copied this pdb to the target machine and it has been loaded correctly.
The inability to see the local variables is most likely due to the optimization the clr is doing - we supply the pdb file and then the debugger works with the clr to get the values without any intervention on our part. If you view Debug/Modules you'll probably see that the module is optimized. You can re-ngen a module with an ini file present to make it more debuggable - see, for example, http://msdn.microsoft.com/en-us/library/9dd8z24x.aspx
Hi-
Thanks for the reply - and sorry for the delay in following up. I didn't get an email alert for some reason.
As far as the alert box, is there any way to disable it? I get it constantly now when debugging in this app and it's more of a nuisance now.
I'll givehte NI file a shot. Since I've actually backed out a couple DLLs and the example is for an EXE, do I just create the INI file for the EXE hosting the DLLs and it will apply to the DLLs as well? What if the app's installer ngen'ed the assemblies at install time? -
There's no way to turn off the alert in the current version.
To make a particular ngen'ed assembly less optimized, you have to re-ngen that assembly. For example, recently I had cause to step through System.Core using Reflector Pro. In order to re-ngen System.Core to make it more debuggable, I
(i) uninstalled the current ngen versionngen.exe uninstall System.Core.dll
(ii) created an ini file named System.Core.ini in the same directory which contained[.NET Framework Debugging Control] GenerateTrackingInfo=1 AllowOptimize=0
(iii) re-ngened it usingngen.exe install System.Core.dll
Does that help?
Add comment
Please sign in to leave a comment.
When I hit a breakpoint, I get this error:
I've found that everything works if I click OK and step through (e.g. line info is correct, etc.), but no locals are resolved. I'm quite certain that I've copied the symbol file in question from the "expected" path to the "loaded" path.
Here is the error when I try and resolve a local:
Is this a supported scenario? If I really need to I can load VS on the box being debugged but I'd prefer not to.