showing parameter values in stack traces

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.
 
A

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.
 
P

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.
 
A

Andrus

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.
 
P

Paul

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top