TOC PREV NEXT INDEX

 


Modifying an Existing Script for Remote Debugging


If you decide to modify your existing script, you must change it to source the prodebug.tcl file and call the debugger_init procedure. Once debugger_init is called, other files sourced by the script will automatically be instrumented. If you want TclPro Debugger to instrument code in the file that calls debugger_init, the code that you wish to instrument must be encapsulated in a call to the debugger_eval procedure. See "About TclPro Instrumentation" for more details on instrumentation.

Your new main script may look like the following:


# Set TclProDirectory to the platform-specific bin
#   subdirectory of your TclPro distribution

set TclProDirectory "/usr/local/TclPro1.4/solaris-sparc/bin"
source [file join $TclProDirectory prodebug.tcl]

# Assume the variables $host and $port respectively contain
#   the name of the machine on which TclPro Debugger is
#   running and the port on which it is listening.

debugger_init $host $port
debugger_eval {
# ... your code goes here ...
}



http://www.ajubasolutions.com
Voice: (650) 210-0100
Fax: (650) 210-0101
support@ajubasolutions.com
TOC PREV NEXT INDEX