Deborah's Developer MindScape






         Tips and Techniques for Web and .NET developers.

October 30, 2010

Setting Break Points in the Call Stack Window

Filed under: C#,Debugging,VB.NET,Visual Studio @ 10:37 am

As you are debugging your application, you may want to set a break point further down the call stack. One way to do this is to double-click on the row in the Call Stack to navigate to the code, and then insert a breakpoint. But there is an easier way.

NOTE: For an introduction to using the Call Stack Window, see this post.

For example, in this sample application, the CustomerWin form calls a BindData method which calls a Retrieve method in the business layer which calls an ExecuteDataTable method in the data layer to retrieve the data. Here is the Call Stack window:

image

To assist with debugging, I want to set a break point when the call stack returns to BindData. Here are the steps:

1) Right-Click on the row that shows the call to BindData().

2) Select Breakpoint | Insert Breakpoint.

The Call Stack window then looks like this:

image

Pressing F5 to continue from the current breakpoint, the code will continue until it hits the BindData method.

Use this technique any time you want to set a breakpoint further up the call stack.

Enjoy!

RSS feed for comments on this post. TrackBack URI

Leave a comment

© 2019 Deborah's Developer MindScape   Provided by WPMU DEV -The WordPress Experts   Hosted by Microsoft MVPs