Posts tagged "debug"

CQ5.5: how to start the server in debug mode


In CQ5.4 you could start the server in debug mode using the [CQ_HOME]/crx-quickstart/server/server.bat file.  The server folder is no longer there in CQ5.5 on Windows.


To start the server in debug mode you can edit the [CQ_HOME]/crx-quickstart/bin/start.bat file and add the same debug parameters from a server.bat in an existing CQ5.4 installation, or you can use the command line below:

java -Xmx512m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=30303,suspend=n -jar cq-author-4502.jar


You may notice that the “Attach Debugger” entry in the CRXDE menu is still disabled even after starting the server in debug mode.  You should analyse the console output on server startup to check for issues related to heap/memory problems which may result in a new process being forked.  The debug options used to start the parent JVM are not passed on to the forked process by default.

You can resolve this by adding more heap to the JVM, and/or by specifying the -nofork command line option to prevent forking.  You can also force the forked process to use the parent JVM parameters by specifying the -forkargs [<arg>…] command line option.

You can find more information on the options mentioned above, and other server startup options under the following link:

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 7.7/10 (7 votes cast)