How to Enable remote debug when Nuxeo on Windows
Hi,
I'm using Nuxeo DM 5.4.1 (Tomcat bundle) on windows and trying to debug the code of a plugin. Following the docs, I have put those lines in nuxeo-dm-5.4.1-tomcat/bin/nuxeo.conf:
JAVA_OPTS=-Xms512m -Xmx1024m -XX:MaxPermSize=512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dfile.encoding=UTF-8 -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044
[...]
nuxeo.force.generation=true
[...]
JAVA_OPTS=$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044
It seems to have no effect. Neither I can connect from my IDE to the Tomcat with a remote debug configuration on localhost on port 1044, nor I see with JVisualVM the expected parameters in the JVM arguments list of the Tomcat process.
Any idea would be appreciated.
Thanks in advance.
Stéphane
The nuxeo.conf indicated in logs is just the one I was touching. I don't get a NUXEO_CONF variable in my env properties.
I have made other tests. In nuxeoclt.bat, there is a set JAVA_OPTS line for the launcher JVM arguments. It seems to be propagated to the Tomcat. When I add debug configuration at the end of this line, I see with JVisualVM the correct VM arguments on my Tomcat. It only works with no gui in option, if not the launcher, which is not halt after Tomcat launch, blocks the debug port.
https://jira.nuxeo.com/browse/NXP-6924
So you must do what you did :( Sorry.
Regards
I noticed that on widows, it doesn't work.
My quick fix was to copy the additional parameters at the end of the first JAVA_OPTS definition.
But I think you can replace $JAVA_OPTS by %JAVA_OPTS% may work also…
If this answer is right one please don't forget to mark it.
The strangest thing is changes in JAVA_OPTS parameters in nuxeo.conf have never effect, whereas when I change for instance nuxeo.force.generation from true to false and vice versa, I clearly see the diff in the boot log.
Nuxeo configuration: /your/path/bin/nuxeo.conf
Is the given path is the path of your nuxeo.conf
Do you have in your environment variable a value for NUXEO_CONF? Start a command console and type "echo %NUXEO_CONF%".
nuxeo.force.generation is used to regenerate all the files that contains configuration. If you want to know more, look there. But the line of JAVA_OPTS is just a environment variable affectation. this is always interpreted.
and then the server its not running