About this site

Tloona is a development environment (IDE) for Tcl/Tk, Itcl and XOTcl, including project management, code browser, deployment and other features. There is also support for web applications (html, AOLServer/.adp, Tclhttpd/.tml, websh/.ws3)

9 January 2008 - 11:57Debugging options in Tloona

As you might have experienced already, the debugger in Tloona does not work. It was the first attempt to integrate a debugger for Tcl code and in the first release it worked. But it relied on a patched version of Tcl that has Arthur Tzewik’s Atkdebugger integrated plus the extension (which is still part of Tloona in the src/ directory). Unortunately this useful extension will obviously never be integrated in the official Tcl, and thus it is not a good idea to rely on it. And Tloona now runs with the official Tcl language, which makes more sense and provides the maintainer with far less headaches ;-).

However, all is not lost. The current SVN trunk has the debugger widgets disabled in order to fasten startup time and remove the unnecessary second process that was previously started. But the widgets on their own are still there and with them the option to integrate a better way for visual debugging.

But how do you debug now? Here is a workaround. The latest SVN head has an improved client console, which is a slave interpreter under the one that runs Tloona. There is also a package debug available in the src/ directory, which you can load in your files with package require debug. It contains a handy procedure [bp] that you can insert in your code at appropriate places. You can even overload the [error] command to provide a breakpoint at Tcl errors. When you run your code (e.g. in Tloona’s client console!) it will stop at the place where [bp] is inserted and you can inspect the code from there. You can also use the [up] and [down] procedures to step levels up or down in the stack trace.. but you can not step to the next statement. Thanks to Neil Madden for the initial version of bp, which he posted on http://lambda-the-ultimate/

Probably there will be a 1.2.1 release soon, which reflects various bugfixes that have been done in Tloona since 1.2.

1 Comment | Tags: Development

Comments:

  1. […] client console. Combined with the ability to send code definitions to the console and the debugging options this is a very pleasant way to develop and test web applications […]

Add a Comment