Eclipse WebLogic调试 [英] Eclipse WebLogic debugging

查看:124
本文介绍了Eclipse WebLogic调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道您可以通过单击Eclipse中的调试图标进行调试。是否可以从命令行启动WebLogic并进行调试并仍然进行调试?当我这样做,在服务器下的Eclipse中,我看到状态是已启动,而不是调试。这可以通过设置远程调试来完成吗?

解决方案

您需要在startWebLogic.cmd中的JAVA_OPTIONS中添加参数或startWebLogic.sh):


-Xrunjdwp:transport = dt_socket,server = y,address = 1044,suspend = n -Xdebug


然后,在Eclipse中,您必须使用远程调试。

在调试配置中添加一个新的远程Java应用程序(通过菜单:运行 - 调试配置)。

确保选择了正确的项目(浏览按钮)并填写<主机中的本地主机和端口中的 1044 。其他选项可以保持不变。



如果您单击调试,您应该可以看到您的远程WebLogic在Debug透视图中运行。



如果您看到在服务器下启动了WebLogic,那么您正在查看嵌入式服务器,而不是通过命令行启动WebLogic。确保在通过命令行启动之前停止任何嵌入式服务器,因为它们无法一起运行在同一个端口上。


I know you can debug by just clicking the debug icon in Eclipse. Is it possible to start WebLogic from the command line with debugging and still debug? When I do that, in Eclipse under server I see that the status is "Started", not "Debugging". Can this only be done by setting up remote debugging?

解决方案

You need to add parameters to the JAVA_OPTIONS in the startWebLogic.cmd (or startWebLogic.sh):

-Xrunjdwp:transport=dt_socket,server=y,address=1044,suspend=n -Xdebug

Then, in Eclipse you have to use remote debugging indeed.
Add a new Remote Java Application in the Debug Configurations (via the menu: Run - Debug Configurations).
Make sure the correct project is selected (Browse button) and fill in localhost in Host and 1044 in Port. The other options you can leave unchanged.

If you click debug you should be able to see your remote WebLogic running in the Debug perspective.

If you see a WebLogic started under Servers, you are looking at an embedded server and not at the one you started via the command line. Make sure to stop any embedded server before starting via the command line as they will not be able to run on the same port together anyway.

这篇关于Eclipse WebLogic调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆