开发者

Can I correctly debug assemblies loaded with the 'AssemblyResolve' event?

开发者 https://www.devze.com 2022-12-31 20:13 出处:网络
I\'m experimenting with the AppDomain\'s \'AssemblyResolve\' event by hidding the depedencies for an executable file in another folder. The assemb开发者_如何学运维lies seem to beloading and executing

I'm experimenting with the AppDomain's 'AssemblyResolve' event by hidding the depedencies for an executable file in another folder. The assemb开发者_如何学运维lies seem to beloading and executing fine, however debugging seems to be crazy, sometimes it hits my break points, sometimes it doesnt , and sometimes it hits the same code twice(It seems absurd but I'm sure the code is executing only once). I don't understanding how debuggers works but I guess it has something to do with the PDB files. Anyone got an idea of what might be happening and how can I fix it?

Edit: Let me add that I'm calling methods on the dynamically loaded assemblies using reflection, sometimes the method I'm stepping over throws an exception that only pops at a later time.


Debug + Windows + Modules, find your DLL in the list. Right-click it and choose "Symbol Load Information". It will show you where it found the .pdb file.

Finding the wrong .pdb is not a great explanation for your troubles btw. Maybe you ought to post to connect.microsoft.com. Giving them a good repro would be essential however.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号