|
|
(3 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
− | If you got problems on production environment this configuration is specially useful.
| + | #REDIRECT [[Debugging remote server]] |
− | | |
− | '''OpenKM 6.x - Tomcat'''
| |
− | | |
− | Add the following options when the JVM is started:
| |
− | | |
− | <source lang="bash">
| |
− | -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
| |
− | </source>
| |
− | | |
− | If you are using shell scripts to start Tomcat, start it with the following command:
| |
− | | |
− | $ $TOMCAT_HOME/bin/catalina.sh jpda start
| |
− | | |
− | It will start Tomcat so that a remote debugger can be connected to port 8000.
| |
− | | |
− | For more info read [http://wiki.apache.org/tomcat/FAQ/Developing#Q1 Tomcat developing: How do I configure Tomcat to support remote debugging?].
| |
− | | |
− | '''OpenKM 5.1 - JBoss'''
| |
− | | |
− | Add this line at the top of ''$JBOSS_HOME/bin/run.sh'' script:
| |
− | | |
− | <source lang="bash">
| |
− | JAVA_OPTS="-Xmx2000m -Djava.awt.headless=true -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000"
| |
− | </source>
| |
− | | |
− | == Configure Eclipse ==
| |
− | Select the project and the host. Include in source your OpenKM java project. You can debug normally, setting breakpoints etc...
| |
− | | |
− | | |
− | [[File:Okm_user_guide_073.jpeg|670px|center]] | |
− | | |
− | | |
− | [[File:Okm_user_guide_074.jpeg|670px|center]]
| |
− | | |
− | See also [http://fherrerav.blogspot.com.es/2007/06/como-hacer-debug-remoto-en-tomcat-desde.html Como hacer debug remoto en Tomcat desde Eclipse].
| |
− | | |
− | == Other tools ==
| |
− | There are some other interesting tools for debugging and profiling a Java application:
| |
− | | |
− | * [http://docs.oracle.com/javase/6/docs/technotes/guides/visualvm/index.html Java VisualVM]
| |
− | ** [https://blogs.oracle.com/nbprofiler/entry/profiling_with_visualvm_part_1 Profiling With VisualVM, Part 1]
| |
− | ** [https://blogs.oracle.com/nbprofiler/entry/profiling_with_visualvm_part_2 Profiling With VisualVM, Part 2]
| |
− | ** [http://hillert.blogspot.com.es/2010/01/remote-profiling-of-jboss-using.html Remote Profiling of JBoss using VisualVM]
| |
− | * [http://java.sun.com/developer/technicalArticles/Programming/HPROF.html HPROF: A Heap/CPU Profiling Tool in J2SE 5.0]
| |
− | * [https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPJMETER HPjmeter]
| |
− | | |
− | [[Category:Developer Guide]]
| |