Re: [TDK] [Komodo-discuss] Tcl remote debugger and spawnpoints
by Alex Panchenko other posts by this author
Nov 5 2008 12:45AM messages near this date
view in the new Beta List Site
Re: [TDK] [Komodo-discuss] Tcl remote debugger and spawnpoints
|
Re: [TDK] [Komodo-discuss] Tcl remote debugger and spawnpoints
Hi,
Here is the detailed information.
There are to files: parent.tcl and child.tcl
=== parent.tcl ===
proc spawn {cmd args} {
puts [exec [info nameofexecutable] $cmd $args]
}
puts "PARENT STARTED"
spawn child.tcl
puts "PARENT FINISHED"
=== child.tcl ====
puts "CHILD STARTED"
puts "CHILD FINISHED"
==================
The contents of the files is based on the
http://docs.activestate.com/tdk/5.0/Debugger.html#mult_processes
The command line used to start debugger is (all on the same line):
C:\TCL-Debug\5\dbgp_tcldebug.exe
-dbgp 192.168.3.135:10000
-app-shell C:\Tcl85\bin\tclsh85.exe
-ide-key dbgp_1225872443074
-log -logfile C:\TCL-Debug\log
-app-file C:\home\tcl-spawnpoints\parent.tcl --
DBGP request:
spawnpoint_set -s enabled -n 6 -i 68 -f
file:///C:/home/tcl-spawnpoints/parent.tcl
DBGP response:
<?xml version="1.0" encoding="UTF-8" ?>
<response xmlns="urn:debugger_protocol" command="spawnpoint_set"
transaction_id="68" state="enabled" id="0" />
After that:
run -i 70
response:
- a few stream/OUTPUT packets, followed by
<?xml version="1.0" encoding="UTF-8" ?>
<response xmlns="urn:debugger_protocol" command="run"
transaction_id="70" status="stopping" reason="ok" />
Debuggger log:
The whole log file size is about 200kb, the spawnpoint handling part is:
...
LOG(timing,3271527680): HandleNubEvent ENTER
LOG(message,3271527680): reading 105 bytes
LOG(message,3271527680): got (105): 'SPAWN_RQ {{0 {} global} {0 {1 6 {97
16}} source C:/home/tcl-spawnpoints/parent.tcl}} {} {spawn child.tcl}'
LOG(timing,3271527680): HandleNubEvent SPAWN_RQ
debug | appState = stopped (traced, sync'd)
LOG(timing,3271527680): DeliverEvent stdin ()
debug | appState = running (traced, sync'd)
LOG(message,3271527680): sent: len=117 'SPAWN_ACK alex
{::dbgp::client::Spawn request {spawn child.tcl} ::client}
C:/TCL-Debug/5/appLaunch.tcl {} tcldbgp2472'
LOG(timing,3271542680): HandleNubEvent ENTER
...
Output:
PARENT STARTED
PARENT FINISHED
Output if there is no spanwpoint or if spawnpoint is disabled:
PARENT STARTED
CHILD STARTED
CHILD FINISHED
PARENT FINISHED
So it looks like the new process is not started if there is a spawnpoint.
Also, it should made subsequent DBGP connection from the child process,
but it also does not happen.
It should be enough information to reproduce the issue. If you need more
information - please let me know.
Thanks,
Alex
Jeff Hobbs wrote:
> Alex Panchenko wrote:
> > I am not sure what mailing list should be used for my question, so I
> > will post to all related ones.
> >
> > I am interested in the DBGP support of the spawnpoints. Does tcl
> > remote debugger support spawnpoints?
> >
> > At the moment Komodo IDE does not allow me even to setup spawnpoints
> > when remote debugger is attached.
> > I can debug the same code with spawnpoint using Tcl Dev Kit Debugger,
> > but it looks like it uses proprietary protocol to communicate with
> > the launched process.
>
> Yes, the TDK Debugger uses a different Tcl-oriented protocol as it
> preceded dbgp and was designed just for Tcl. The debugger backends
> between TDK and Komodo use the same debugging core for Tcl though.
> There handling of spawnpoints will vary as the protocol allows, but as
> it is the debugging core with the support, it should be "the same".
>
> > Back to the DBGP: I can send spawnpoint_set command (and verify the
> > result with spawnpoint_list), but when the process reaches the
> > specified line nothing happens. Should I use some undocumented
> > commands to make it work, is it a bug or a missing feature?
> >
> > My configuration is
> > - Windows XP
> > - Tcl 8.4
> > - latest tcl remote debugger
>
> In my testing, one obvious variation that I noted was that TDK will
> report invalid spawnpoint lines (lines not recognized by the debugger
> as allowable spawn points). In TDK, a dialog will show to indicate
> this, but I received no such feedback from Komodo.
>
> Currently only [exec], [spawn] and [thread::create] are recognized
> spawn point generators. This is a hardcoded core list (unless you
> extend with .pdx files), and I noticed one quirk about this ...
> exp_spawn was not recognized, whereas spawn was. This is something we
> need to correct.
>
> In any case, that may be what you hit. You are using the correct dbgp
> commands though. Can you describe in more detail the tests you are
> using? Have you tried running dbgp_tcldebug with -log (activate
> logging) and -logfile myfile.txt (redirect log from stdout to file)?
> That should provide more detailed information.
>
> Regards,
>
> Jeff
_______________________________________________
TDK mailing list
TDK@[...].com
http://listserv.ActiveState.com/mailman/listinfo/tdk
Thread:
Alex Panchenko
Jeff Hobbs
Alex Panchenko
Hemang Lavana
Andreas Kupries
Andreas Kupries
Hemang Lavana
|