简体   繁体   中英

Debugger in Eclipse is not working

I'm trying debug servlet class in aem. But i got problem, breakpoint I check is not working.

在此处输入图片说明

Can you please help me in this case ?

Thanks all!

Are you sure the doCode() method is being called? Is the log line getting printed?

If yes, it might be possible that you have skipped all breakpoints by going to Run -> Skip all breakpoints

Still doesn't work? Try to build again. If build automatically is turned off, classes may not be refreshed. Code being executed could be different.

To start an AEM instance in debug mode, you usually have to append (according to Adobe documentation)-

-Xmx512m -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n Your start command should then look something like this-

java -Xmx4096m -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n -jar <name-of-jar>.jar

In case the debugger is not working, there could be 2 common reasons (and maybe more!)-

  1. -Xmx - the value might be too low. Increase it to a higher value. I usually use -Xmx4096m to assign 4GB of memory to my AEM instance.

  2. You've probably skipped all breakpoints. Just go to the debug window in your IDE (Eclipse or IntelliJ) and make sure "Skip all breakpoints" is not active

In case the debugger does not connect, then please check the port. The debug configuration port should match the address=8000 in the start command.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM