Solved

Following a huge program with debugging.

Posted on 2011-03-08
8
342 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone 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

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

809 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