komdo debugger for an application that creates tcl interpreter

Posted by nagaraja83 on 2010-03-18 22:42

I have an application that calls Tcl_Main which creates a tcl interpreter under the context of my application. I source a tcl file to it and run the commands.

I want to debug this file use komodo when my application is running.

I have added my application path in the TCL interpreter location in Edit->preferences->languages->Tcl.

I put a breakpoint the tcl file that I source. But it does not work as in the debugger is not working.

What am I missing? can you please give me steps on how to start debugging using Komodo in my scenario

ericp | Fri, 2010-03-19 10:01

This note's from Andreas:

No. The interface between 'dbgp_tcldebug(.exe)' and the debugged application is the same, regardless of dbgp_tcldebug called from Komodo (normal setup), or from the user (remote setup).

Now, looking at dbgp_tcldebug, it calls the application (script) like this:

    <shell-executable> \
        appLaunch.tcl <port-number> \
        <tcl-script> <client-data> \

The <shell-executable> is normally the chosen tclsh or wish.
The <tcl-script> is the Tcl application to debug.

The appLaunch.tcl is the script actually run first by the <shell-executable> , it sets everything up in the tcl interpreter, including connecting to to start talking to dbgp_tcldebug, and then (last step) sources the <tcl-script> to hand over control to the Tcl code to debug, which is now in the modified environment which talks to the debugger.

In his description his C application is taking the place of the <shell-executable>. As it is very likely not understanding the arguments as shown above it fails and likely does nothing.

If he can modify this application to recognize this type of syntax then he should be able get it working.

So you'd have to get dbgp_tcldebug to call your application,
rather than tclsh or wish.

- Eric

flouret | Mon, 2017-08-28 15:41

Hi ,

Do you have any example of what the parameter would be used for ?

Best Regards