How to Enable remote debug when Nuxeo on Windows


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
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.


0 votes

2 answers



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.

1 votes

Ok this problem have been fixed for Nuxeo 5.4.2:

So you must do what you did :( Sorry.



Thanks for your help. Planning to upgrade in a mid-term.

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.

1 votes

Indeed, I'm on Windows. I don't succeed with your answer. I have already tried to put parameters at the end of the first line without success. %JAVA_OPTS% don't work better.

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.


Can you start your tomcat and look into the first lines of logs this line:

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.


Windows 7, Nuxeo Cap 5.5, unmcomment: JAVA_OPTS=$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044

and then the server its not running