eclipse远程调试
我向 Eclipse 添加了一个 Java 项目,并从命令行运行它。由于它是预先构建的,所以我没有构建它。 OfBiz 项目已启用远程调试。我是否需要在 Eclipse 中编译项目才能进行远程调试?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,你不需要重新编译,但你必须使用以下选项启动你的应用程序:
这里的端口 1044 当然可以更改。
如果您的应用程序正在运行,请打开调试对话框并使用“远程 Java 应用程序”/新
编辑将 eclipse 调试器附加到应用程序的 JVM:我忘了提及,这要求预编译应用程序在外部启动。如果您不想从 Eclipse 内部启动它,则必须重新编译,否则 Eclipse 无法找到要执行的“Main”类。
No you don't need to recompile, but you have to start your application with options like:
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.