|
PBTraceState | |||
The PBTraceState constant contains the current state of the compilers trace mode while it's compling your program. This allows you to write code that can ensure parts of your program are compiled with/or without the compiler embedding trace mode hooks into your code. Trace Modes 0 = Compiler is NOT embedding Trace Mode codes. 1 = Compiler is embedding Trace Mode codes. Mini Tutorial: The following example shows how you can ensure that a section of code will be compiled with a specified debugger trace mode enabled, regardless of the current state of trace mode. You can use this for your own code/function libraries. This will make sure the PlayBASIC debugger won't trace into your functions for example. This not only makes larger program perform better when compiled in debug mode, it will also make debugging programs much easier too. As the debugger won't trace through code that isn't relevant. (relevant to your debugging that is) Of course each section you wish to protect, requires it's own unique constant. This constant stores the debugger trace state prior to the start of this section. It's then used at the end of this sectionto restore the trace mode state. Note: This code should be compiled/run from the IDE using the F6 (run(trace/debug mode)
When compiled in Debug Mode (F6) this sample will output.
When compiled in normal Mode (F5) this sample will output.
|
Related Info: | PBCompileMode | PBDebug | PBDebugMode | PlayBasicVersion : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |