PDA

View Full Version : Isolating hard to find bugs



barrymavin
2012-10-19, 04:53
If you have a situation where your code is misbehaving you can can get an execution trace by compiling with debug information which will help us identify what may be causing the issue internally.

In the console workspace.



set debug on
compile your_filename debug
do your_filename


Then look in the debug directory (c:\lianja\debug\debug.txt on windows) and you can see what was last executed before the crash.

When DEBUG is ON the debug_client.txt file (in the same directory) will provide a trace of the internal object model calls to methods and property setters/getters as well.

Remember to recompile without debug once you have isolated the problem as there is an obvious performance penalty with this.

dcipher
2012-10-19, 08:23
If you have a situation where your code is misbehaving you can can get an execution trace by compiling with debug information which will help us identify what may be causing the issue internally.

In the console workspace.



set debug on
compile your_filename debug
do your_filename


Then look in the debug directory (c:\lianja\debug\debug.txt on windows) and you can see what was last executed before the crash.

When DEBUG is ON the debug_client.txt file (in the same directory) will provide a trace of the internal object model calls to methods and property setters/getters as well.

Remember to recompile without debug once you have isolated the problem as there is an obvious performance penalty with this.


Thank-you for explaining this feature as I can see it being very useful.