On Sun, Aug 10, 2008 at 9:30 PM, janandith jayawardena
<[EMAIL PROTECTED]> wrote:

> Bertrand:
>>...Or debug the
>>source code, of course, which is the most precise way of finding
>>things out.
>
> How can I debug the source code. Usually I look at the mvn output when there
> is an error and try to find the reason.

Debugging and tracing the Sling source code is a much better way of
understanding precisely how things work.

To enable remote debugging when running the launchpad/testing webapp,
for example, do

  cd launchpad/testing
  export MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=9362,server=y,suspend=n"
  mvn jetty:run

This tells the JVM that runs Sling to open a remote debugging socket
on port 9362.

You can then use any remote java debugger (Eclipse, Netbeans, etc.) to
connect to the VM on port 9362 and set breakpoints in the Sling code,
step through it, etc.

-Bertrand

Reply via email to