내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

How to remote dubug AEM OSGI bundle using eclipse?

Avatar

이전 커뮤니티 멤버

Hi there,

Firstly starting CQ5 with:

java -Xmx512m -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n -jar cq-author-4502.jar

Then to start a remote debugging session from Eclipse, do the following:

  1. Open Eclipse.
  2. Choose Run > Debug Configurations.
  3. Right-click Remote Java Applications and select New.
  4. Select your CQ5 project under Project.
  5. Type in the port from the "address" configuration of the jvm parameter defined above. In the example, it is port 8000 (and the host name of the machine you are connecting to, most likely localhost)
  6. To start a debugging session, double-click your new configuration in the Debug Configurations screen after saving it.

However, i find the Breakpoint marked in eclipse never pause but the background print task running log that indicates program work finished.

Anyone know how to deal with it? Thanks a lot in advance.

(Reference source:http://helpx.adobe.com/experience-manager/kb/CQ5HowToSetupRemoteDebuggingWithEclipse.html)

Best regards,

Brian

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 10

See this community artilce that talks about how to setup an AEM project using Eclipse for debugging:

https://helpx.adobe.com/experience-manager/using/creating-aem-project-using-eclipse.html

원본 게시물의 솔루션 보기

11 답변 개

Avatar

Employee

Hi Brian,

 

did you add the OSGi project (usually 'core' or 'bundle') to your debugging configuration? If you just add the 'apps' project (jsp, js, css, etc.) eclipse will not stop on a breakpoint.

 

Best regards

Matthias

Avatar

이전 커뮤니티 멤버

hi schoger,

Yes, i did add the bundle to debugging configuration. Please see following screenshot:

[img]debug.png[/img]

But i notice log is printed, the breakpoint never pause! It's weird.

This is a sling servlet that integrated into OSGI bundle and deployed, as a result i suspect it not support debug servlet?

Avatar

Level 10

Thats surprising ! can you add couple of more debug points and check

Avatar

Employee

Hi Brian,

 

Servlet debugging is definitely possible! From your screenshot it looks like your debugger is not properly attached to the host process, after properly attaching, the breakpoint icon changes to a point with a little tick, see the screenshot I attached.

Please post a screenshot of your 'Servers' view open like in my screenshot, is the core bundle really added and synchronized?

[img]Debugging.jpg[/img]

 

Best Regards

Matthias

Avatar

이전 커뮤니티 멤버

This class only one method doGet() to run, so i insert a breakpoint in the beginning. But never pause!

Avatar

이전 커뮤니티 멤버

Hi Matthias,

Sorry i can't find the 'Servers' view to pen since i use the eclipse version 'Luna Release (4.4.0)'.

And i am sure core bundle added.

 

Best regards,

Brian

Avatar

Employee

Hi Brian,

 

no problem, I use Luna myself. You can find the 'Servers' view at 

Window->Show View->Other ...->Server->Servers

I'm not sure what the problem is with your installation, but something is wrong since Eclipse does not mark your breakpoint as valid (the missing tick on the breakpoint bullet).

 

Best regards

Matthias

Avatar

이전 커뮤니티 멤버

Hi Matthias,

I just download Eclipse Luna SR1 to view server but, missing tick on the breakpoint bullet as well. It's confused.

I guess it not relevant to the Eclipse. Maybe there is other reason to this problem.

 

Best regards,

Brian

Avatar

Level 10

Hi Brian,

  Can you add a screenshot of your server configuration ?

Avatar

이전 커뮤니티 멤버

Hi bsloki,

Sorry, i don't understand what your meaning of server configuration? And the code dont need to run any server platform. Just remote debug.

Please let me know what you want to know.

 

Best regards,

Brian

Avatar

정확한 답변 작성자:
Level 10

See this community artilce that talks about how to setup an AEM project using Eclipse for debugging:

https://helpx.adobe.com/experience-manager/using/creating-aem-project-using-eclipse.html