Ken, I've never really used the Java debugger so I'm no expert, but try this patch and see if it can get you by for now. If it works I'll make an option out of it.
It basically changes Inline::Java so that it starts the debugger instead of a plain JVM. You will probably need to increase STARTUP_DELAY to give you time to set your breakpoints and the like. One of the problems is that presently the temporary source files are deleted by the time the JVM is actually started, so I'd need to copy them over when in debug mode. But maybe the .class contain enough info to get you by. There's an Inline option to leave the build directory intact after the build, so maybe you can get the source from there and use the EXTRA_JVM_ARGS option to pass the path to jdb. Let me know if this helps at all. Pat ===================== diff -r1.39 JVM.pm 107c107 < "java" . Inline::Java::portable("EXE_EXTENSION")) ; --- > "jdb" . Inline::Java::portable("EXE_EXTENSION")) ; 151c151,152 < my $in = new IO::File("<$dn") ; --- > # my $in = new IO::File("<$dn") ; > my $in = ">&STDIN" ; 164c165 < close($in) ; --- > # close($in) ; On Wed, 2003-11-26 at 09:55, Williams, Ken wrote: > Thanks, Patrick, I'll give it a try. > > It'll be a little difficult because my main script calls various Java > methods in semi-complicated ways, so I'll essentially have to replicate my > entire perl script in Java. > > I wonder if there would be a way to write a simple Java wrapper around my > perl script, using [something equivalent to] an InlineJavaPerlCaller > invocation. Then I could start the whole schmeer fairly easily using jdb. > > -Ken > > > -----Original Message----- > From: Patrick LeBoutillier [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 25, 2003 7:16 PM > To: Williams, Ken > Cc: Inline mailing list (E-mail) > Subject: Re: Using the Java debugger > > > Ken, > > That's a great question. There's probably no way to run everything through > the Java debugger, but it should be fairly straitforward to run the > generated Java code outside of Inline::Java. > > Your Java classes should be in _Inline/lib/auto/<something>/, <something> > being a mangled form of your script name or it's NAME if you used that > option. > > From there what you need to do is simply write a new simple Java class > that will be your main class and start using your generated Java classes > the same way you do it through Perl. > > If this is not clear let me know and I'll try to write-up an example using > some code from the Inline::Java documentation. > > Cheers, > > Patrick > > Hi, > > > > I've got some Inline::Java code that's throwing itself at the mercy of the > > infinite loop gods. Is there any way to use the Java debugger (jdb) or > > similar to step through the java portions? Or guidelines for figuring out > > how to do it manually with the stuff in the _Inline/ directory? > > > > -Ken > >