Solved

Following a huge program with debugging.

Posted on 2011-03-08
8
340 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
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.

920 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

16 Experts available now in Live!

Get 1:1 Help Now