There are a number of options available to debug your application in Eclipse.

If not done already prepare your application for remote debugging as described here: Enable remote debugging

Via command line:

$ java -Xdebug -agentlib:jdwp=transport=dt_socket,address=9999,server=y,suspend=n -jar start.jar

Linking with Eclipse

Next we need to link the Eclipse project with the deployed webapp.

  1. Within Eclipse, right-click on the project containing the webapp deployed into jetty and select Debug → Debug Configurations and create a new configuration of Remote Java Application. Make sure the port you choose is the same as the one you added in Enable remote debugging.

  2. Next in your webapp you can set a breakpoint within a servlet which when it is tripped will halt the remote jvm’s processing thread to await for debugging commands from your Eclipse instance.

  3. Accessing that servlet within your browser, pointed at your remote debug configurated jetty-distribution, should transition your Eclipse instance to the standard Debug view.

Within Eclipse

Since Jetty can be incredibly simple to embed, many people choose to create a small main method which they can launch directly within Eclipse in order to more easily debug their entire application. The best place to get started on this approach is to look through Embedding Jetty and the Embedded Examples sections.

Once you have a main method defined in order to launch your application, right-click on the source file and selectDebug As → Java Application. In your Console tab within Eclipse you should see your application startup and once it has completed startup you should be able to configure breakpoints and hit the Jetty instance as normal via your web browser.

[转] http://www.eclipse.org/jetty/documentation/9.3.x/debugging-with-eclipse.html

[Jetty] Debugging With Eclipse的更多相关文章

  1. [C++] Solve "No source available for main()" error when debugging on Eclipse

    In Mac, the issue image: 1. A existing cmake project on disk 2. import this project into Eclipse. 3 ...

  2. Java Debugging with Eclipse - Tutorial

    1.1. What is debugging? Debugging allows you to run a program interactively while watching the sourc ...

  3. maven eclipse jetty debug

    可以通过查看最近版本: http://mvnrepository.com/artifact/org.eclipse.jetty/jetty-server http://search.maven.org ...

  4. 使用Eclipse+Maven+Jetty构建Java Web开发环境(几个教程综合集成2014发行)

    工作需要使用Jetty由于web集装箱,得知Eclipse+Maven+Jetty该组合是非常好的,因此,要在网上找了很多教程,但不写或多或少特定的或过时的内容而导致最终的配置失败,易于配置为未来的同 ...

  5. MyEclipse 和 eclipse 最简单的安装Jetty容器插件

    一.MyEclipse安装jetty 1.下载jetty插件  http://pan.baidu.com/s/1nuMYGNv 2.将下载后的jetty插件放到安装MyEclipse目录的MyEcli ...

  6. Jetty使用教程(一)——开始使用Jetty

    一.Jetty简介 1.1 什么是Jetty Jetty是一个提供HHTP服务器.HTTP客户端和javax.servlet容器的开源项目.   这个入门教程分为五个部分: 第一部分部分重点介绍如何使 ...

  7. Jetty:配置JSP支持

    选择JSP实现 从Jetty-9.2開始,使用Apache Jasper作为默认JSP容器实现.在前面的版本号中使用的是Glassfish Jasper,在后面的版本号中也能够继续使用它. Jetty ...

  8. 25个最佳最闪亮的Eclipse开发项目

    http://blog.csdn.net/howareyoutodayyhz/article/details/8264599 25个最佳最闪亮的Eclipse开发项目 标签: eclipseEclip ...

  9. Jetty使用教程(四:28-30)—Jetty开发指南

    二十八.延续机制支持 28.1 延续简介 延续是一种机制用来实现类似于Servlet 3.0异步功能的异步Servlet,但提供了一个简单易操作的接口. 28.1.1 为什么使用异步Servlets ...

随机推荐

  1. WinForm 双向数据绑定

    程序目标: 控件的属性值与对象的属性值双向绑定使窗口控件的属性值与对象的属性值保持一致.对窗口控件属性值更改后立即更新对象的属性值,对对象的属性值更改后立即更新窗口控件的属性值. 程序完整代码包:ht ...

  2. Step by Step Recipe for Securing Kafka with Kerberos

    Short Description: Step by Step Recipe for Securing Kafka with Kerberos. Article I found it is a lit ...

  3. WPF 控件之 Popup

    1.经常使用属性说明 IsOpen: 布尔值,指示 Popup 控件是否显示 StaysOpen: 布尔值,指示在 Popup 控件失去焦点的时候,是否关闭 Popup 控件的显示 PopupAnim ...

  4. 强化学习(五)—— 策略梯度及reinforce算法

    1 概述 在该系列上一篇中介绍的基于价值的深度强化学习方法有它自身的缺点,主要有以下三点: 1)基于价值的强化学习无法很好的处理连续空间的动作问题,或者时高维度的离散动作空间,因为通过价值更新策略时是 ...

  5. app测试中隐藏键盘

    1.参考连接 https://www.cnblogs.com/raindrop2007/articles/7849905.html 2.在项目中的使用 2.1 设置手机上的“语言输入法”,选择appi ...

  6. CSS 实现自动换行、强制换行、强制不换行的属性

    实现效果 1.自动换行: word-wrap:break-word; word-break:normal; 2.强制换行: word-break:break-all;       按字符截断换行 /* ...

  7. 2018年NGINX最新版高级视频教程

    2018年NGINX最新版高级视频教程,想要的联系我,QQ:1844912514

  8. 腾讯云服务器哪个地区节点好?来ping一下速度就知道了

    腾讯云服务器怎么样?速度快吗?相信很多网友在购买云服务器之前都有此疑惑. 本人找了很久也没找到各区域节点的测试速度的域名和IP.即使有也不能批量查看对比哪个区域的速度. 网上都说这个区域节点速度快,那 ...

  9. golang文件操作

    一.读写文件 1.读文件操作 os.File 封装所有文件相关操作 例子: package main import ( "fmt" "os" "io/ ...

  10. 2019-04-09 SpringBoot+Druid+MyBatis+Atomikos 的多数据源配置

    前面部分是网上找的,我按照网上写的把自己搭建的过程展示一次 1.引入依赖 目前项目本来使用到了Mybatis plus(在自己的Mapper接口中继承BaseMapper获得基本的CRUD,而不需要增 ...