showing parameter values in stack traces

  • Thread starter Thread starter Andrus
  • Start date Start date
A

Andrus

I have debug turned on in VWD2008 Express solution, but parameter values are
not shown in c# stack traces.

Track trace looks like

....
void mymethod( string myparam )
....

How to change this so that it shows parameter values also like

void mymethod( string myparam = "myvalue" )

as I have seen in some places.

Andrus.
 
Paul,
Custom Exceptions...

Exception which causes stack trace to print can be any:
Nullreferenceexception from framework if null is passed or any other.

Can you be more specific ?
Has VDW2008 has some setting somewhere ?
Can we wrote exception handler which parses call stack and adds parameter
values also ?

Andrus.
 
It may or may not work but overriding the StackTrace method should allow you
to create code to interogate the Stack Trace using System.Diagnostics
StackTrace Class I doubt you could get variable names directly from this but
you should be able to itterate the stack trace and using reflection fill in
the blanks. Very heavy Yes but entirly possible well I think.
 
Paul,
It may or may not work but overriding the StackTrace method should allow
you to create code to interogate the Stack Trace using System.Diagnostics
StackTrace Class I doubt you could get variable names directly from this
but you should be able to itterate the stack trace and using reflection
fill in the blanks. Very heavy Yes but entirly possible well I think.

Visual Studio stack trace window shows parameter values. How to use the same
code which is used to visualize parameter values in stack trace window ?

Andrus.
 
Debuging windows use reflection I believe


Andrus said:
Paul,


Visual Studio stack trace window shows parameter values. How to use the
same code which is used to visualize parameter values in stack trace
window ?

Andrus.
 
Back
Top