How to debug mvn jetty:run in Eclipse 使用mvn jetty:run命令时,在eclipse中如何配置debug
2014-06-16 14:49
531 查看
http://1985wanggang.blog.163.com/blog/static/776383320120384555181/
打开eclipse,
Run/External Tools/External Tools ..."
1.点击Run工具栏
2.打开/External Tools配置项
3.加入一条配置,如图所示:
4.增加环境变量。
4.打开debug配置项,如图所示
5.选择remote java application,点击新建按钮,配置项如图所示:
运行命令启动jetty服务:
1.运行自定义的jetty服务
2.启动debug
启动后的图示
注:也可以在电脑的系统环境变量中,配置mvn的环境变量,不过没有这样灵活,可以在eclipse运行程序,将控制台输出到eclipse的界面中
================================================================
================================================================
参考:
[align=center]How to debug mvn jetty:run in Eclipse
[/align]
原文链接:http://simile.mit.edu/wiki/How_to_debug_mvn_jetty:run_in_Eclipse
that matches your webapp. For "Arguments:" add jetty6:run.
Move to the "Environment" tab and click the "New" button to add a new variable named MAVEN_OPTS with the value:
-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y
If you supply suspend=n instead of suspend=y you can start immediately without running the debugger and launch the debugger at anytime you really wish to debug.
[edit]
in the address= property above.
Now all you need to do is to Run/External Tools and select the name of the maven tool setup you created in step 1 to start the plugin and then Run/Debug and select the name of the debug setup you setup in step2.
打开eclipse,
Run/External Tools/External Tools ..."
1.点击Run工具栏
2.打开/External Tools配置项
3.加入一条配置,如图所示:
4.增加环境变量。
4.打开debug配置项,如图所示
5.选择remote java application,点击新建按钮,配置项如图所示:
运行命令启动jetty服务:
1.运行自定义的jetty服务
2.启动debug
启动后的图示
注:也可以在电脑的系统环境变量中,配置mvn的环境变量,不过没有这样灵活,可以在eclipse运行程序,将控制台输出到eclipse的界面中
================================================================
================================================================
参考:
[align=center]How to debug mvn jetty:run in Eclipse
[/align]
原文链接:http://simile.mit.edu/wiki/How_to_debug_mvn_jetty:run_in_Eclipse
Step 1
Go to the Run/External Tools/External Tools ..." menu item on the "Run" menu bar. Select "Program" and click the "New" button. On the "Main" tab, fill in the "Location:" as the full path to your "mvn" executable. For the "Working Directory:" select the workspacethat matches your webapp. For "Arguments:" add jetty6:run.
Move to the "Environment" tab and click the "New" button to add a new variable named MAVEN_OPTS with the value:
-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y
If you supply suspend=n instead of suspend=y you can start immediately without running the debugger and launch the debugger at anytime you really wish to debug.
[edit]
Step 2
Then, pull up the "Run/Debug/Debug ..." menu item and select "Remote Java Application" and click the "New" button. Fill in the dialog by selecting your webapp project for the "Project:" field, and ensure you are using the same port number as you specifiedin the address= property above.
Now all you need to do is to Run/External Tools and select the name of the maven tool setup you created in step 1 to start the plugin and then Run/Debug and select the name of the debug setup you setup in step2.
相关文章推荐
- How to use bitBucket with EGit in Eclipse,如何在Eclipse中使用bitbucket远程仓库
- 如何Eclipse改变模板中${user}变量,How to change the variable ${user} used in the eclipse templates.
- All-In-One Code Framework(AIO): 如何使用C#编写进程外的COM组件 (How to write an out-of-proc COM server in C#)
- How to Configure Eclipse for Python --- 在eclipse中如何配置pydev
- How to use toolbar control on dialog using CToolBar class in VC++ - VC++ 中用CToolBar 类如何使用ToolBar控件
- How to make JDev run ant script in debug mode permanently
- 如何在QT for S60 中使用pthread库(Carbide.c++) (How to use pthread in QT4.6 for S60)
- Debug Jetty in Maven started by mvn jetty:run
- How to Plan and Configure YARN and MapReduce 2 in HDP 2.0 如何配置YARN
- 如何在Vista中使用MMC方式的Remote Desktops(How to use Remote Desktops through mmc console in Vista)
- How to run eclipse in clean mode? and what happens if we do so?
- [转]How to use String.Format in PowerShell?(如何在PowerShell中使用string.format?)
- How to use ComboBox Control in VC++ - 在VC中如何使用 ComboBox 控件
- How to run debug SQL with in front end(EBS)?
- JDev: How to make JDev run ant script in debug mode permanently
- How to Enable and Run a Payables Concurrent Program in Debug Mode
- How to Insert OLE Object (Adobe Acrobat Document) in Word with C#(如何使用C#在Word中插入OLE对象-PDF文件)
- how to enable debug in eclipse + weblogic
- HowTo use linux laptop in presentations 【如何在Linux系统上使用投影仪】
- Eclipse配置问题:Error :- java runtime environment JRE or java development kit must be available in order to run eclipse