Stack Dump |
Top Previous Next |
It is often useful to know exactly how execution has reached a certain point in the program. For example, when a runtime error occurs, the error messages will tell you where the error occurred, but nothing about the context and steps that led up to the error. Many low-level subroutines are called from dozens of different places, and the way a subroutine is called may be the cause of the error.
For this reason the IDE lets you view the path that the program took from any particular point in the program. To view this information, select the Debug -> Stack Dump option from the menu bar. This will bring up the stack dump dialog.
Going To A Line. Double clicking on a line in the Stack Dump will take you to the corresponding line in the Source Code Editor. If the Debug Console is open, double clicking will also take you to the corresponding line in the Debug Source Panel.
Using the Stack Dump. The Stack Dump is usually used in three situations:
1. Runtime Errors. When a runtime error occurs, the IDE automatically highlights the line in the Source Editor where the error occurred. At this point you can bring up the Stack Dump to see how the code execution reached the point where the error occurred.
2. Breakpoints. You can also display the Stack Dump after you've encountered a Breakpoint in the Debug Console. This will show you how the program reached the breakpoint.
3. Stepping. You can also display the Stack Dump while you are Single Stepping in the Debug Console. The Stack Dump is updated after each step, so you can keep track of where you are in the code and how you got there.
|