The ProblemYou want to debug your code on a CQ5 server using Breakpoints in CRXDE, but the Debug option is greyed out.
The SolutionChances are, you are not running CQ5 in debug mode. Here is a simple way to start your CQ5 instance in debug mode, and how to attach CRXDE to it.
Assuming a windows machine and a local copy of CQ5 for the purposes of this tutorial, located at c:\cq5\author running on the default port 4502.
1. Ensure that all local instances of CQ5 are shut down.
2. Under windows. open up command from the start menu, navigate to the c:\cq5\author directory
3. copy and paste the following command:
java -debug -XX:MaxPermSize=256M -Xnoagent -Xmx1024M -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=30303 -jar cq5-author-4502.jar -nofork
4. IMPORTANT: It can take quite a while for the server to start in debug mode. Wait until your browser window opens up at the author login screen before continuing.
5. Open up CRXDE. Search for it in your supplied CQ5 materials.
6. Enter http://localhost:4502 in the URL field, and admin/admin for the username and password.
7. Click on OK, and wait for CRXDE to load.
8. To test, we can navigate to a piece of code that you can break into.
A good place to test is to put a breakpoint on line 31 in /apps/geometrix/components/title/title.jsp
When you have put the breakpoint in, navigate to:
You will now be able to step through your code.