Red Gate forums :: View topic - Debugging: local variables "do not exist in current context"
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 5
SmartAssembly 5 forum

Debugging: local variables "do not exist in current context"

Search in SmartAssembly 5 forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
fvicente



Joined: 27 Oct 2010
Posts: 2
Location: Madrid, Spain

PostPosted: Wed Oct 27, 2010 12:05 pm    Post subject: Debugging: local variables "do not exist in current context" Reply with quote

Hello,

we're having some trouble debugging a SA-merged assembly in VS2008. We've used both our licensed SA5.5 and the SA6 beta and the result is the same:

We generate debugging info in SA, and debugging works fine for breakpoints, step-into and all but for methods local variables. We can see the values of every method parameter or class attributes, but not the values of local variables - it's as if they don't exist. We tried with mouse hover, immediate window and watches to no avail. Also, conditional breakpoints which mention local variables don't work due to "The name 'xxxx' does not exist in the current context". However, code lines that use them execute normally.

If we reference the original assembly this behaviour disappears so this information is clearly lost in the merging process.

We thought at first it could be related to the code being optimized but we don't check any option regarding optimization, obfuscation or whatever - we just do the merge and generate the pdb - also we sign with a strongname but that shouldn't be related...

Any ideas of what could be causing this? Has anyone experienced this before?

Thanks!

EDIT: I tried an unsigned version just in case, same result
Back to top
View user's profile Send private message
Alex.Davies



Joined: 02 Dec 2008
Posts: 335
Location: Cambridge, uk

PostPosted: Wed Oct 27, 2010 6:02 pm    Post subject: Reply with quote

Yep, the pdb generated by SmartAssembly isn't as good as the original, and that is one of the things that it usually gets wrong.

I tend to use .NET Reflector pro to debug obfuscated assemblies, personally, although obviously that means you have to reduce the obfuscation level to the minimum you can to reproduce the problem. Luckily problems with control flow obfuscation are really rare, because you can't use Reflector pro with that turned on.
_________________
Alex
Developer,
Red Gate .NET Tools
Back to top
View user's profile Send private message
fvicente



Joined: 27 Oct 2010
Posts: 2
Location: Madrid, Spain

PostPosted: Thu Oct 28, 2010 8:09 am    Post subject: Re: Reply with quote

Alex.Davies wrote:
Yep, the pdb generated by SmartAssembly isn't as good as the original, and that is one of the things that it usually gets wrong.


Any chance this is getting this fixed in SA 6? I understand the local variable info is inside the original pdbs so SA should be 'merging' this info too right?

It's quite critical to our development process to be able to debug our merged-SDKs properly.

Thanks for the response, Alex
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group