tomcat服务器实例在eclipse中调试 [英] tomcat server instance debugging in the eclipse

查看:147
本文介绍了tomcat服务器实例在eclipse中调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在eclipse中有以下配置

I have the following configuration in the eclipse


  1. 从服务器视图创建了一个tomcat 7.0服务器实例。 >
  2. 创建一个示例Web应用程序并通过maven-tomcat-plugin部署在服务器中,并在浏览器中进行测试(右侧启动服务器
    从服务器视图中单击服务器并选择启动)

  3. 尝试使用JPDA选项在创建的服务器实例中配置远程调试设置,我在服务器设置中添加了env变量。

  4. i当我从以前的eclipse启动服务器时,无法将调试器连接到服务器。

  5. 但是当我直接从安装目录启动时,使用命令提示符就可以无缝连接
  1. Created a tomcat 7.0 server instance from the servers view.
  2. Created a sample web application and deployed in the server through maven-tomcat-plugin and tested it in the browser ( started the server by right clicking the server from the server view and selected start )
  3. Tried to configure the remote debugging settings in the created server instance using JPDA options,i added the env variables in the server setting.
  4. i could not connect the debugger to the server when i start the server from the eclipse as like previously.
  5. But it connected seamlessly when i start the directly from the installation directory using the command prompt as like

catlina.bat jpda开始

  • 之后,我尝试过,我启动了服务器实例(通过从服务器视图右键单击服务器启动服务器选择DEBUG模式)

  • 我得到代码中的断点,甚至热代码替换
    工作!!!


  • 任何人都可以解释以下内容?

    Can anyone explain the following?




    1. 当我尝试jpda选项进行远程调试时出现什么问题在eclipse中创建的服务器实例?

    2. 调试选项和热代码替换如何与服务器实例配合使用?这是远程调试还是其他?可以解释一下吗? / li>
    1. What goes wrong when i tried jpda options for the remote debugging with the created server instance in the eclipse?
    2. How the debug option and Hot Code replacement works with the server instance?Is this remote debugging or something else?Can you explain on this one?


    推荐答案

    eclipse tomcat插件在运行时产生单独的JVM,可以在窗口中确认任务列表,在unix系统中使用ps或使用visualVM。

    the eclipse tomcat plugin spawns a separate JVM while running, you can confirm that in the windows task list, using ps in unix like systems or using visualVM.

    该虚拟机以调试模式启动,由插件本身设置的JPDA参数,调试机制起作用,它基于JVM功能。您可以使用JDK附带的可视虚拟机确认使用哪些jpda参数。

    That VM is launched in debug mode with the JPDA parameters set by the plugin itself, and that is how the debugging mechanism works, it's based on the JVM functionality. You can confirm which jpda parameters are used by using visual VM, that comes with the JDK.

    我不认为您可以覆盖eclipse插件设置的JPDA参数对于你,这就是为什么在第1点)它没有工作。 2)通过远程调试工作,通过自动设置参数并在服务器启动后连接远程调试器。

    I don't think you can override the JPDA parameters that the eclipse plugin setted for you, that's why in point 1) it did not work. For 2) it works via remote debugging made transparent by automatic setting the parameters and connecting the remote debugger once the server starts.

    这篇关于tomcat服务器实例在eclipse中调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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