Solved

Following a huge program with debugging.

Posted on 2011-03-08
8
337 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 74

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 74

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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 74

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 74

Expert Comment

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

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now