Casey Dunn
(from an email thread in sakai-dev)
Here is a very brute force and time consuming method which has the benefit of being very "instructional." In a slow way.
[snip of stuff related to this postings context in the email thread]
load sakai2 into your eclipse environment.
start your tomcat this way:
catalina.sh jpda start
this configures the JVM to open a debugging port (8000)
| Security warning anyone can now access this Sakai instance using the following technique |
in eclipse choose:
- debug -> remote java application -> new
- give it a name
- in the source tab select add
- select Java Project from the Add Source popup
- in the project selection popup select all the sakai2 projects you created above
- close all that, getting back to the Debug setup window
- double check that the connection type is appropriate. I use socket attach myself.
- doublecheck the host name and port.
- then click the debug button...
nothing immediately happens, but this is OK.
root around to find the RequestFilter over in the kernel project
set a break point in the doFilter. near the top will do
access your site via a web browser.
At this point you can have the pleasure of walking through the Sakai request using
the Eclipse debugging tools.
Eclipse may well shudder a bit and ask if you would like to continue in the debugging perspective. you do. In this perspective you will see some arrows that point down (enter fcn call) and sort of loop over (skip entry, go to next stmt). (you may want to grab an Eclipse book if you've not used this part of Eclipse.)
Have fun!
In practice you'll more often set these break points far far far further down
the call stack; you'll see why after you grovel through this a few times.
Remote debugging is very useful.