[英]debugging JSP in eclipse running on SAP Hybris Server
I not able to enter into the debug mode in eclipse, I'm building an application using SAP Hybris. 我无法在Eclipse中进入调试模式,我正在使用SAP Hybris构建应用程序。 Here we are using builtin Hybris server.
在这里,我们使用内置的Hybris服务器。
Was the Hybris server started in the Debug mode ? Hybris服务器是否以调试模式启动? If yes, make sure that the port used by the server for debugging is the same with the one you are trying to connect to !
如果是,请确保服务器用于调试的端口与您尝试连接的端口相同!
The port which is used by Hybris should be logged at the server startup, eg: Hybris使用的端口应在服务器启动时记录,例如:
Listening for transport dt_socket at address: 8000 在地址8000上侦听传输dt_socket
add this line tomcat.debugjavaoptions=-Xverify:none -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n
to your local.properites and then execute ant all
to update tomcat configuration and after that if you run platform using hybrisserver.bat debug
it will start in debug mode. 添加此行
tomcat.debugjavaoptions=-Xverify:none -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n
到您的local.properites中 ,然后执行ant all
来更新tomcat的配置,如果您更新了它,使用hybrisserver.bat debug
运行平台,它将以调试模式启动。 Make sure your eclipse remote debugger is trying to connect on 8000 port 确保您的Eclipse远程调试器正在尝试在8000端口上连接
Also, you will have to let the JSP compile first (first request). 另外,您必须首先让JSP编译(第一个请求)。 so, you will have to reload the page again for the debugger to stop for you.
因此,您将不得不重新加载页面以使调试器停止运行。
Thirdly, the debugger may not stop at any random piece of JSP code. 第三,调试器可能不会在任何随机的JSP代码处停止。 You will likely have to add a scriptlet (simple sysout) and add the debug point there to be able to engage the debugger.
您可能必须添加一个scriptlet(简单的sysout)并在其中添加调试点才能使用调试器。
Hope, you are looking for how to debug hybris application? 希望您正在寻找如何调试hybris应用程序?
As Hybris runs in builin server, you can debug it as Remote Java Application from Eclipse
由于Hybris在builin服务器中运行,因此您可以从Eclipse将其作为远程Java应用程序进行调试
hybrisserver.bat debug
(In windows) or ./hybrisserver.sh debug
(In linux) hybrisserver.bat debug
(在Windows中)或./hybrisserver.sh debug
(在Linux中)启动服务器 extensions
in eclipse extensions
cartPageController.java
) cartPageController.java
) Run > Debug Configurations
(shortcut: Alt + r + b
) Run > Debug Configurations
(快捷键: Alt + r + b
) Remote Java Application
in your left pannel of popup Remote Java Application
Remote Java Applicaiton
and click on new Remote Java Applicaiton
,然后单击“新建”。 Apply
Apply
创建新配置 Debug
to start your debug mode
Debug
以启动debug mode
Nowe enjoys the debugging by putting breakpoints. Nowe通过放置断点来进行调试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.