Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Diagnosing why DebuggerTypeProxy attributes are not working

I'm trying to make a wrapper for a COM object easier to work with when debugging by adding a DebuggerTypeProxy attribute - the attribute appears to work some of the time (when running unit tests etc...), but doesn't work when I'm actually debugging the target process and I don't know why:

  • I've checked to make sure that the correct assembly is being loaded in the modules window, and even disassembled the assembly to make sure that its the correct one and has the correct attributes etc...
  • I've tried making my debug proxy classes public, but that made no difference.
  • I've used reflection in the Immediate window while debugging my external process and seen that the attribute I've defined appears to be correct.

Other classes that have DebuggerTypeProxy attributes defined on them (in the same assembly) seem to be working fine - I just can't figure out why

  • Is there any other reason why my DebuggerTypeProxy attribute wouldn't be working in the target process?
  • Are there any other ways of debugging / troubleshooting the reason why the attribute is having no effect?
like image 264
Justin Avatar asked Aug 02 '10 06:08

Justin


1 Answers

I had this same problem and found the answer was to uncheck the "Show raw structure of objects in variables windows" in Tools > Options > Debugging > General settings.

like image 105
jnielsen Avatar answered Sep 22 '22 18:09

jnielsen