To debug a TCL file remotely, apply the following steps:

  • execute the external program outside of RamDebugger. In this case, execute Examples/example2.tcl by double clicking over it or using wish example2.tcl
  • Open RamDebugger
  • Load the TCL file inside RamDebugger with Files->Open file. In this case, use the example located in <RamDebugger directory>/Examples/example2.tcl
  • Set a breakpoint in line 29 with Debug->Set breakpoint or press F9 after having the cursor in the desired line.
  • Start debugging remotely with File->Debug on->example2Note: Depending on the preferences, it may be necessary to do File->Debug on->Update remotes before finding the remote program in the menu list. Depending on the computer (in Windows), it can be necessary to wait for several seconds for RamDebugger to find the remote program.
  • Press button Go in the remote application
  • Program should stop in line 29. From now, it is possible to use similar commands than in local debugging (see Debugging locally)

To debug remotely, in Windows it is necessary to load the package comm in the remote program. To do so use add something similar to the code below in you program, in any place that gets executed before beginning the debug session (typically at the beginning of your program):

lappend ::auto_path <RamDebugger path>/addons

package require commR

comm::register application_name 1

Note: The package commR included in RamDebugger is based on the package comm in tcllib with some modifications. Use always commR instead of comm. This package uses sockets for communication. If you have a firewall in your computer, maybe it will not work. In Linux/Unix, the communication is made with the command send, So, it is only necessary to have this command enabled in the program, which is true by default. Note: It can be necessary to check the security of the server in Unix before being able to use send. As a fast workaround, write command xhost - in the UNIX command line.

Note: Package commR can also be used in Unix and MacOSX.

Previous page

Up page

Next page