在 Eclipse 中调试 Web 应用程序 [英] Debugging Webapps in Eclipse

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

问题描述

我想通过 Eclipse 调试一个 web 应用程序.webapp 将在我在 Eclipse 中配置的 Tomcat 7 实例上运行,因此所有内容,包括 Tomcat 的启动都将在 Eclipse 中完成.

I want to debug a webapp through Eclipse. The webapp will be running on a Tomcat 7 instance that I have configured within Eclipse, and thus everything, including Tomcat's launch will be done from within Eclipse.

现在,我的问题是在这种情况下调试 web 应用程序的最佳方法是什么.是否可以本地调试,或者唯一的解决方案是远程调试.

Now, my question is what is the best way to debug the webapp in such a situation. Is local debugging possible, or the only solution is remote debugging.

我知道如何进行远程调试,但鉴于一切都是在 Eclipse 内完成的,我想看看是否有更好的方法.

I know how to do remote debugging, but given that everything is done from within Eclipse, I wanted to see if there is a better way of doing it.

推荐答案

点击 Run -> Debug Configurations....在左侧,您应该列出您的 tomcat 服务器.(如果没有,您首先必须在首选项中定义它).

Click on Run -> Debug Configurations.... On the left side you should have your tomcat server listed. (if not, you first have to define it in the preferences).

配置您的 VM 设置以及您需要的任何内容,然后只需单击右下角的 Debug.

Configure your VM settings and whatever you need, then just click Debugin the lower right corner.

您的服务器现在应该以调试模式启动,并在断点处停止.

Your server should now start in debug mode, and stop on breakpoints.

从现在开始,服务器将包含在工具栏中调试按钮的弹出菜单中.

From now on the server will be included in popdown menu of the Debug-Button in your toolbar.

或者,您可以添加 Servers 视图(Window -> Show View -> Servers),选择您的服务器并通过右键单击在调试中启动它

Alternatively you can add the Servers View (Window -> Show View -> Servers), select your server and start it in debug by right-clicking

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

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