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. ztree搜索节点并展开

    web <div class="zTreeC"> <div class="searchL" lay-filter="searchL& ...

  2. CentOS6.9安装WordPress搭建自己的博客网站

    首先说明我用的是服务器上之前装的mysql数据库,只需要配置上就行了 准备工作 CentOS6.9 在/目录下创建一个目录src,把下载的东西都放到这个文件夹下 下载Apache Httpd,下载地址 ...

  3. 分享收集的WebGL 3D学习资源

    大家好,我在本文中分享了我收集的WebGL 3D相关的博客.书籍.教程.demo等内容,希望对大家学习WebGL和3D有所帮助,谢谢- 相关博客 Wonder技术 Wonder是我们的产品,包含Web ...

  4. CentOS配置svn

    参考: https://www.cnblogs.com/taohaijun/p/7172939.html 1.检查已安装版本  rpm -qa subversion 卸载旧版本SVN yum remo ...

  5. 自己常用易忘的CSS样式

    鼠标小手:   cursor:pointer 点击边框消失:outline:none; ul li下划线以及点消失: list-style-type:none; span 超出内容为...:overf ...

  6. [转帖]万字详解Oracle架构、原理、进程,学会世间再无复杂架构

    万字详解Oracle架构.原理.进程,学会世间再无复杂架构 http://www.itpub.net/2019/04/24/1694/ 里面的图特别好 数据和云 2019-04-24 09:11:59 ...

  7. open live writer 测试

    什么是Hash表 1.定义 Hash(散列/哈希),就是把任意长度的输入(又叫做预映射, pre-image),通过散列算法,变换成固定长度的输出,该输出就是散列值.这种转换是一种压缩映射,也就是,散 ...

  8. kettle变量(param命名参数2)

    接arg参数: 通过命令行进行变量赋值和引用 定义跟界面定义相同: 赋值(转换): 运行命令到kettle目录下 pan /file:path "/param:aa="bb&quo ...

  9. js判断iPhone XS、iPhone XS Max、iPhone XR

    // iPhone X.iPhone XS && window.screen.width === && window.screen.height === ; // iP ...

  10. jQuery的事件处理

    一.页面加载响应事件 $(document).ready()方法,获取文档就绪的时候.他极大地提高了Web相应速度.虽然该方法可以代替传统的window.onload()方法,但是两者之间仍然有差别. ...