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

fvicentefvicente Posts: 3
edited October 28, 2010 3:09AM in SmartAssembly 5
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

Comments

  • 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
  • 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
Sign In or Register to comment.