Re: [tcljava-user] How to debug a TclBlend application
Brought to you by:
mdejong
From: Mo D. <md...@cy...> - 2000-11-21 06:57:26
|
On Tue, 21 Nov 2000, Udi Margolin wrote: > Hello, > > When running java code from a tcl interpreter using the tclblend mechanism, > is there any way to hook up to a java debugger (such as JBuilder 4) on > Windows ? > Usually the Java environment runs the process from within - in our case > there is no seperate process for the java - it part of the Tcl process. There tend to be two ways to debug a Tcl Blend problem. The first is to build the tclblend dll with debug symbols and connect to it with gdb or VC++. The second (and the way you seem to be wanting) is to actually debug the JVM using a Java debugger. I have not tried connecting a Java debugger to Tcl Blend, but it seems like it should be possible. The trick would be to find what command line arguments you needed to pass to the java process and then pass the in using the tclblend_init global Tcl variable. I tend to try a Java debugger with Jacl first, since it is a 100% Java application. If you can reproduce the bug in Jacl then it is in the "tcljava" library that is shared by Jacl and Tcl Blend. If the bug only shows up in Tcl Blend, then it can get a little bit more complex to debug. The other thing you could try is to load Tcl Blend into a Java application that you already connected to with a debugger. The ability to load Tcl Blend into a running java process is new to 1.3, so you would need the most recent CVS version to do that. Try that out and tell us how it goes, I am looking forward to hearing about your results. Mo DeJong Red Hat Inc |