开发者

eclipse remote debugging

开发者 https://www.devze.com 2022-12-17 04:42 出处:网络
I added a Java project to Eclipse and I am running it from the command line.Since it was pre-built, I did not build it.The project, OfBiz, is enabled for remote debugging开发者_如何学编程.Do I need to

I added a Java project to Eclipse and I am running it from the command line. Since it was pre-built, I did not build it. The project, OfBiz, is enabled for remote debugging开发者_如何学编程. Do I need to compile the project in Eclipse before I can remote debug into it?


No you don't need to recompile, but you have to start your application with options like:

-Xdebug -Xrunjdwp:transport= dt_socket,address=1044,server=y,suspend=n

The port here 1044 of course can be changed. If you application is running, open the debug dialog and attach the eclipse debugger to the application's JVM using "Remote Java Application" / New

EDIT: I forgot to mention that this requires that the precompiled app is start externaly. If you wan't to start it from inside eclipse, you would have to recompile otherwise eclipse can not find the 'Main' class to execute.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号