Changes for page Debugging

Last modified by Simon Urli on 2023/10/10 11:46

<
From version < 1.2 >
edited by VincentMassol
on 2007/02/09 16:52
To version < 1.3 >
edited by VincentMassol
on 2007/02/09 17:15
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -9,8 +9,28 @@
9 9  
10 10  1.1 Remote Debugging
11 11  
12 -To perform remote debugging you start XWiki in debug mode and then use your IDE to attach to the running JVM. You can then put breakpoints in the code.
12 +To perform remote debugging, start you wiki in debug mode. To do this modify the way you start your container and ensure that the following JVM parameters are passed:
13 13  
14 +{code}
15 +-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
16 +{code}
17 +
18 +For example, for Jetty you could use the following start script:
19 +
20 +{code}
21 +#!/bin/sh
22 +
23 +JETTY_HOME=.
24 +JETTY_PORT=8080
25 +JAVA_OPTS="-Xmx300m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
26 +
27 +java $JAVA_OPTS -Dfile.encoding=iso-8859-1 -Djetty.port=$JETTY_PORT -Djetty.home=$JETTY_HOME -jar $JETTY_HOME/start.jar
28 +{code}
29 +
30 +Then, in your favorite IDE, open the XWiki project and run a remote debugging session, attached to the socket on port 5005. For example, using IntelliJ IDEA, go to ~~Run|Edit Configurations...~~ and create a new ~~Remote~~ configuration (default parameters should be fine). Then execute it and IDEA will connect to the executing JVM.
31 +
32 +You can then place breakpoints in your source code.
33 +
14 14  1.1 Logging
15 15  
16 16  Several possibilites:

Get Connected