cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul G. Joseph" <pjos...@gmail.com>
Subject jdb easy to use but can't find Cocoon sample source code?
Date Tue, 27 May 2014 12:29:02 GMT
Hi there,

(Windows XP 32 bit, Tomcat 7.x, Cocoon 2.11, Java SE 1.7)

I find that the java sdk comes with a java debugger that relatively 
easily connects to a tomcat instance and allows one to set breakpoints 
in the java code.  The jdb version seems available by issuing the 
-version flag.
$ jdb -version
This is jdb version 1.6 (Java SE version 1.7.0_51)

To connect, all I had to do in a Cygwin terminal (after making sure 
Tomcat was listening also on port 8000) was to issue the command:
$ jdb -connect com.sun.jdi.SocketAttach:port=8000

So if I have a class myClass and a method, myMethod and I want to set a 
breakpoint on a line in that method which is say, line 99, then I can 
quite easily do so, and the breakpoint is honored.  I can then issue a 
"print" command to the jdo session to see the variable values in that 
method, and also for the class.

Very useful given how easy it was to setup.

The problem though is this.  I can't seem to connect it to the Cocoon 
source code.  The instructions say to specify the source path and when I 
do so, it simply doesn't work--the request to "list" the code above and 
below the current location of the cursor returns: "code for 
myClass.class not found."

The command I used was:
$ jdb -sourcepath 
"C:\cocoon-2.1.11_mini_array_2_x\src\blocks\ojb\java\org\apache\cocoon\ojb\samples" 
-connect com.sun.jdi.SocketAttach:port=8000

The code for myClass is in the directory above, specified by the 
-sourcepath flag.

Any suggestions?

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message