0

As I know when AEM is started in debug mode from the console using the -debug option, the JVM will be forced to fork, but what will be the result if the AEM is started with the -debug -nofork options? e.g:

java -jar aem6-author-p4502.jar -debug 8000 -nofork

Diego Nieto
  • 581
  • 2
  • 10
  • 23

3 Answers3

1

Fork or nofork does not matter. aem6 will decide based on the available memory. if you want to debug, using following command

java.exe -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9669,suspend=n -XX:+PrintGC -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -jar aem-quickstart-6.2.1.jar

then in intellj or eclipse connect it with remote debug. you can only debug the code in osgi bundles. you can't debug the jsp code.

Russel Yang
  • 2,633
  • 3
  • 21
  • 18
0

What works for me is to double-click the server instance in Eclipse. It opens up the details. Near the right bottom corner, there is an option for "Debug". Expand it and uncheck the "Resolve sources when connecting".

This stops Eclipse from comparing your Eclipse code with the code running inside the server. This isn't an ideal answer. Ideally, we want to sync the Eclipse code with the server code, otherwise debugging has no meaning -- assume you're off by even one line of code when debugging.

I'm answering your specific question. For a broader answer on this, please see:

Eclipse java debugging: source not found

Puneet Lamba
  • 755
  • 8
  • 15
0

Sometimes our system OS generates multiple java forks in that case -nofork added at the end of the command will resolve the issue.