VS.NET 2005: Debug: Go to calling function?

P

Pieter

Hi,

How do I do this in Visual Studio .NET 2005? I want to kind of jump out of a
function, but without executing the next lien of code?

For instance: If I have a method MyTestMethod(strParam as String), which is
called over 100 times in my application from different other methods. When
an exception occurs in MyTestMethod, I would like to be able to go to the
original Method that called MyTestMethod.

How can I do this? I can see that the original functions are marked in grey
in VS.NET, but I have to brows through my code to find them :-S So there
should be an easier way? Some shortcut that brings me directly to the
calling method?

Thanks a lot in advance, any help will be really appreciated!

Pieter
 
O

Oenone

Pieter said:
How can I do this? I can see that the original functions are marked
in grey in VS.NET, but I have to brows through my code to find them
:-S So there should be an easier way? Some shortcut that brings me
directly to the calling method?

I think you're looking for the Call Stack window. Depending on how your IDE
is configured, you may find it by pressing Ctrl+L, otherwise select the
Debug/Windows/Call Stack menu item.
 
R

RobinS

If you rethrow the exception, it will be passed back up and handled in the
calling routine.

If you're talking about running in Debug mode, can you pick the line with
the Return on it and right-click, select <Set Next Statement> and then keep
stepping; it will run the Return as the next statement and then the next
step will return you to the calling routine.

Hope that helps.
RobinS.
 

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