Leaders snarfblam Posted August 13, 2006 Leaders Posted August 13, 2006 I can't get the DebuggerDisplay attribute to work in C# express. It works just fine in VB. I searched google and it seems like I'm the only person who has this problem. I can't find any relevant settings or anything. Module Module1 Sub Main() Dim var As New X 'Displays "Test" in the debugger. End Sub End Module <DebuggerDisplay("Test")> _ Class X End Class [CS] class Program { static void Main(string[] args) { X var = new X(); // Displays "{ConsoleApplication2.X}" in debugger } } [DebuggerDisplay("Test")] class X {} [/CS] Anyone have any ideas? Quote [sIGPIC]e[/sIGPIC]
Wraith Posted August 14, 2006 Posted August 14, 2006 I've been perplexed by this in the past. Mine is working now and i can't remember exactly which debugger options i had to change. I think you need to ToString() evaluation and JustMyCode enabled, give it a try. Quote
Leaders snarfblam Posted August 14, 2006 Author Leaders Posted August 14, 2006 Sounded like it just might work, but no dice. Quote [sIGPIC]e[/sIGPIC]
Leaders snarfblam Posted August 22, 2006 Author Leaders Posted August 22, 2006 I found that if I disable "Unwind the call stack on unhandled exceptions" the debugger display attribute works correctly, along with a number of other minor problems (including the occasional inability to view instance members after an exception because the "this" pointer is not available). I think that this puts certain limitations on when you can edit and continue. Quote [sIGPIC]e[/sIGPIC]
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.