[英]Debugger in Eclipse is not working
Are you sure the doCode() method is being called?您确定正在调用 doCode() 方法吗? 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如果是,则您可能通过转到 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)-要在调试模式下启动 AEM 实例,您通常必须附加(根据 Adobe 文档)-
-Xmx512m -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n
Your start command should then look something like this- -Xmx512m -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n
你的启动命令应该看起来像这样 -
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!)-如果调试器不工作,可能有 2 个常见原因(也许更多!)-
-Xmx
- the value might be too low. -Xmx
- 值可能太低。 Increase it to a higher value.将其增加到更高的值。 I usually use -Xmx4096m
to assign 4GB of memory to my AEM instance.我通常使用-Xmx4096m
为我的 AEM 实例分配 4GB 内存。
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只需转到 IDE(Eclipse 或 IntelliJ)中的调试窗口并确保“跳过所有断点”未处于活动状态
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.调试配置端口应与 start 命令中的address=8000
匹配。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.