我有一个网络应用程序。它目前部署在Glassfish实例中的远程服务器上。是否有可能使用Netbeans远程连接到服务器并调试应用程序(就像我正常的Java应用程序一样)?
如果有人已经这样做并且可以提供洞察力或可以指向我一个指导,这将是伟大的。
我知道这个功能存在与Visual Studio和ASP.Net。我不确定是否有Java等价物。
我在网上看到的大多数示例都是针对只在远程计算机上运行或调试Glassfish应用程序的应用程序运行在本地机器上。
解决方案是的,这是可能的。
在调试模式下运行GlassFish后,请转到NetBeans中的调试菜单,然后单击附加调试器... ,这会调出附加对话框。调试器:Java调试器(JPDA)
blockquote>连接器:SocketAttach
传输:dt_socket $ b 主机:hostname_or_ip_address
端口:9009
超时可能留空。在此对话框中单击确定时,您应该能够将NetBeans调试器连接到GlassFish。
请记住:
阅读 JPDA文档,您可以使用其他选项。
I have a web application. It is currently deployed on a remote server in a Glassfish instance. Is it possible to remotely connect to the server and debug the application (like I would a normal java application) using Netbeans?
If someone has done this and could provide insight or could point me to a guide, that would be great.
I know this functionality exists with Visual Studio and ASP.Net. I was not sure if there is a java equivalent.
Most examples that I have seen online are for applications that are simply running on a remote machine or for debugging a Glassfish application running on the local machine.
解决方案Yes, it is possible.
Once you have GlassFish running in debug mode, go to the Debug menu in NetBeans and click on Attach Debugger..., which brings up the Attach dialog. You'll probably go with something like:
Debugger: Java Debugger (JPDA)
Connector: SocketAttach
Transport: dt_socket
Host: hostname_or_ip_address
Port: 9009
Timeout may be left blank. When you click OK on this dialog, you should be able to connect your NetBeans debugger to GlassFish.
Remember:
Read the JPDA docs for other options you can use.
更多推荐
远程调试在Glassfish中运行的Java Web应用程序
发布评论