Solved

Following a huge program with debugging.

Posted on 2011-03-08
8
343 Views
Last Modified: 2012-05-11
Hi there;

I am following a huge program with debugging feature of VS 2010. My question is that is there a functionality in VS 2010 that helps me to have the track of the classes and functions I visited, so that I won't get lost?

Kind regards.
0
Comment
Question by:jazzIIIlove
  • 4
  • 4
8 Comments
 
LVL 75

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 500 total points
ID: 35076708
You can view the Call Stack window. In 2008, you can find it under the Debug->Windows->Call Stack; it should be the same for 2010. You will only have it as an available option when you are actually running your program under debug mode (i.e. you at some breakpoint or stepping through your code).

One neat feature I like about this is that you can actually double click on one of the stack members (as long as it is managed code you have debug symbols for), and you can actually view the state of the app at that level. What I mean by this is you can actually bring that stack member into a temporary scope and inspect in-scope variables.
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 35089230
>>One neat feature I like about this is that you can actually double click on one of the stack members
Even ithe stack member is not in the executing scope.
>>(as long as it is managed code you have debug symbols for
managed code? what is that? sorry for my illiteracy. For debug symbols I only encounter them during the very debugging loading moment.

>>What I mean by this is you can actually bring that stack member into a temporary scope and inspect >>in-scope variables.
I really love to see an example of this, and 500 points without a doubt.

Kind regards.

0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 35089353
Here is a storyboard:

 Break!
Here, I'm at a breakpoint. You can see that I'm at my current point of execution because the arrow to the left is yellow (along with the next line to be executed). You'll notice in the Call Stack window at the bottom that my current stack frame is also indicated with a yellow arrow.


 Jumping Frames
Here, I have double-clicked the second entry in the Call Stack window and VS has now loaded up (temporarily) the frame I selected. I can hover over "whatIWillSend" and see its value--even though I'm not technically in this scope for my normal execution (which you can still see highlighted in yellow). You'll notice a green arrow has popped up and this indicates you are viewing something outside of the normal thread of execution. You get a similar green arrow when you debug multi-threaded applications.

If I hit the continue button (F5), the temporary frame jump is disregarded and the Console.WriteLine() call will be executed, just as it would have been had I not inspected the previous frame.

As I stated previously, you can't do this unmanaged code or code for which you don't have the .pdb file (the debugging symbols).
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 12

Author Comment

by:jazzIIIlove
ID: 35089410
so, when there is no pdb, it's unmanaged, meaning?

P.S.

Btw. one of the best comments, anyone even out of IT domain can understand your comment, which proves that you are remarkable explaining it.

Kind regards.
0
 
LVL 75

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 500 total points
ID: 35089462
>>  so, when there is no pdb, it's unmanaged, meaning?

No. Unmanaged means C/C++ code, etc. Basically, if it wasn't written in .NET, it's unmanaged.

PDB files are files VS generates when you are doing a DEBUG build. They are files which hold all of the variable names, function names, etc. (symbols). The names you give variables and functions mean nothing to the computer. All it cares about is offsets from some address. When you compile code, your names are disregarded and the offsets are created. The PDB files are used to link the compiled offsets back to something you can understand--the names you gave.

Probably more that you wanted to know  = )


>>  Btw...

Much to kind  = D
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 35089921
500 pts. without a doublt.

Kind regards.
0
 
LVL 12

Author Closing Comment

by:jazzIIIlove
ID: 35089928
swift, accurate and precise.
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 35093870
NP. Glad to help  = )
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question