I have an tcl project running with tclsh.exe.... In this project I
would like to create an other Interpreter in a separate application as
an small debugger for global variables.
One possibility is to use DDE Server/Client. I'm wondering if it's
possible to use TCOM or COM/DCOM zu communicate between the two tcl
interpreters?
On 9 Feb., 10:14, core powe <corep...@gmail.com> wrote:
> I have an tcl project running with tclsh.exe.... In this project I
> would like to create an other Interpreter in a separate application as
> an small debugger for global variables.
> One possibility is to use DDE Server/Client. I'm wondering if it's
> possible to use TCOM or COM/DCOM zu communicate between the two tcl
> interpreters?
You may use the tcllib comm package:
package require comm
comm::comm config -local 0 -port 1991
For debugging, there are also tkconsole, TclInspector and TclDebugger
> I have an tcl project running with tclsh.exe.... In this project I
> would like to create an other Interpreter in a separate application as
> an small debugger for global variables.
> One possibility is to use DDE Server/Client. I'm wondering if it's
> possible to use TCOM or COM/DCOM zu communicate between the two tcl
> interpreters?
> Thankful for every help :)
> core
Check if you just can run the application for debugging purpose in a shell like
tclsh, wish, tkcon.
Maybe the package "comm" in Tcllib ? From the descrption : "The comm command provides an inter-interpreter remote execution facility much like Tk's send(n), except that it uses sockets rather than the X server for the communication path. As a result, comm works with multiple interpreters, works on Windows and Macintosh systems, and provides control over the remote execution path."
> For debugging, there are also tkconsole, TclInspector and TclDebugger
> (from the book "Tcl8.5 Network Programming)
Where can I find this book or this TclInspector/ TclDebugger? ^^
I think I have to describe my problem properly :)
The first application (tclsh.exe= main project) runs continuously
executing a long commando list and prints at times reports to the
screen.
Actually there is no time to stop and wait for requests from the
second Application (tclsh.exe= debugger).
The project shoud work in this way that the main project is doing his
work until a request from the debugger (reading a global variable for
example) arrives to be answerd.
It would be much better to have an interrupt handling, but I know tcl
does'n support this. So I thought to solve this problem with an event
handling by using DDE Server/Client configuration.... Or how do you
think? Are there other possibilities to solve the problem?
Maybe there are existing debuggers I can use...
On 9 Feb., 16:09, core powe <corep...@gmail.com> wrote:
> Hello to all.
> @Harald Oehlmann> For debugging, there are also tkconsole, TclInspector and TclDebugger
> > (from the book "Tcl8.5 Network Programming)
> Where can I find this book or this TclInspector/ TclDebugger? ^^
http://wiki.tcl.tk/26647 IMHO very good book about the TCL universe.
Even good if you don't do any network programming.
> It would be much better to have an interrupt handling, but I know tcl
> does'n support this. So I thought to solve this problem with an event
> handling by using DDE Server/Client configuration.... Or how do you
> think? Are there other possibilities to solve the problem?
> Maybe there are existing debuggers I can use...
I think the comm package will give you what you need.
you initialise it and start the event queue (vwait).
On the other hand there are the following applications which might
help you (beside the ones I already mentioned):
tkcon
tkinspect
ram debugger
Unfortunately, I am the wrong person to ask. I don't do it this way
personally (expect using tkcon).
-Harald
> @Harald Oehlmann
>> For debugging, there are also tkconsole, TclInspector and TclDebugger
>> (from the book "Tcl8.5 Network Programming)
> Where can I find this book or this TclInspector/ TclDebugger? ^^
> I think I have to describe my problem properly :)
> The first application (tclsh.exe= main project) runs continuously
> executing a long commando list and prints at times reports to the
> screen.
> Actually there is no time to stop and wait for requests from the
> second Application (tclsh.exe= debugger).
> The project shoud work in this way that the main project is doing his
> work until a request from the debugger (reading a global variable for
> example) arrives to be answerd.
> It would be much better to have an interrupt handling, but I know tcl
> does'n support this. So I thought to solve this problem with an event
> handling by using DDE Server/Client configuration.... Or how do you
> think? Are there other possibilities to solve the problem?
> Maybe there are existing debuggers I can use...
DDE, COM, comm package it does not matter -- events are only processed when you "tell" tcl to go into the event loop (i.e. Tcl does not do interrupt processing).
ActiveState offers a debugger as part of its TDK.
You need to modify your program to add: update idletask
This should be done at least at the beginning or end of the main loop (or where ever you loop doing your processing).
I use this activeState debugger already with eclipse IDE, but how can
I remotely debug my running tclsh project with it without influencing
my main application? I just want to have an small debugger for
checking the values of global variables.
What exactly is the tcl event loop? I think you mean this part of
code:
> I use this activeState debugger already with eclipse IDE, but how can
> I remotely debug my running tclsh project with it without influencing
> my main application?
Any and every debugger influences the application being debugged.
> I just want to have an small debugger for
> checking the values of global variables.
On 10 Feb., 15:24, "Gerald W. Lester" <Gerald.Les...@KnG-
Consulting.net> wrote:
> On 2/10/12 2:39 AM, core powe wrote:
> > What exactly is the tcl event loop?
> Please search onhttp://wiki.tcl.tk
We are sorry, it is not waht you wrote.
As it is a basic language element of TCL, I would recomment to use a
TCL book or read the wiki.
Please come back if questions get more precise,
Harald