Changing Project Instrumentation Settings
The Instrumentation tab of the Project window, shown in Figure 10, lets you select files and classes of procedures that TclPro Debugger should and should not instrument. Instrumenting a file gives TclPro Debugger control over its execution, and allows you to set breakpoints, single-step through the file, and perform other debugging tasks. If a file is not instrumented, you can't perform debugging tasks while your application is executing the file (or procedures defined in that file). For more information about instrumentation, see "About TclPro Instrumentation".
Some cases of when you would want to control which files are instrumented and which files are not include:
Figure 10 The Project Instrumentation Settings Tab
- When you use a common Tcl script library for several projects in your organization. In this case, you would most likely debug the library separately and then instruct TclPro Debugger not to instrument the library when you later debug individual projects that use that library.
- When you debug large applications. Instrumenting a script takes time and slows the execution of your application. To minimize the overhead of debugging, it is more efficient to instrument and debug portions of your application separately.
The top half of the Project Instrumentation dialog determines the files that TclPro Debugger instruments. (By default, all files are instrumented.) The first list box identifies a set of files to instrument, and the second list box identifies a subset of exceptions that are not instrumented. File name patterns follow the string match pattern conventions. (See the Tcl string command reference page for more information on pattern syntax.) Whenever your application sources a script file, TclPro Debugger compares the file name against the patterns you specify in this dialog to determine whether or not to instrument it. For example, setting the pattern "app*.tcl" in the first list box and "*GUI.tcl" in the second list box causes TclPro Debugger to instrument files such as appMain.tcl and appStats.tcl, but not instrument a file named appGUI.tcl.
To add a pattern to a list box, type the pattern in the String Match Pattern field and then click the Add button next to the appropriate list box. To remove a pattern from the list, click the file or pattern to highlight it, then click the Remove button.
Note: If you delete all patterns in the first list box and then apply the setting (by clicking either the OK or Apply button), TclPro Debugger automatically adds the pattern "*" to the first list box. If TclPro Debugger didn't do this, then you could accidentally cause TclPro Debugger not to instrument any files, in which case you couldn't control your application with the debugger.
The lower half of the Project Instrumentation dialog provides finer control of the instrumentation of procedures and control structures in a script file:
- Instrument Dynamic Procs: Instrument procedures that you create dynamically. For example, selecting this check box instruments procedures created by the eval command.
- Instrument Auto Loaded Scripts: Automatically instrument auto-loaded scripts. You might want to turn this option off if you are using only standard Tcl extensions.
- Instrument [incr Tcl]: Instrument all your [incr Tcl] classes and methods.
- Instrument TclX: Instrument control structures in the TclX package, such as the loop command.
- Instrument Expect: Instrument the control structures in the Expect package, such as the expect command.
Note: Changes that you apply to your project settings (by clicking either the OK or Apply button) while your application is running don't take effect until the next time you restart your application.
http://www.ajubasolutions.com Voice: (650) 210-0100 Fax: (650) 210-0101 support@ajubasolutions.com |