简体   繁体   English

Eclipse Java远程调试:如何确保我在项目中获得的代码与JVM中运行的代码相同?

[英]Eclipse Java Remote Debug: How do I ensure that the code I've got in my project is the same as the code running in the JVM?

I've got some existing source code, and jars for a webapp. 我有一些现有的源代码,以及一个webapp的jar。 I am attempting to run the webabb using tomcat and then remote debugging the tomcat server using eclipse to figure out what is happening with the webapp. 我试图使用tomcat运行webabb,然后使用eclipse远程调试tomcat服务器,以了解webapp发生了什么。

For some reason however, eclipse refuses to trap any breakpoints. 但是由于某种原因,eclipse拒绝捕获任何断点。 I've compared the md5sums of the jars on the server with the ones I've got in my debug project, and they match. 我已经将服务器上的jar的md5sums与我的调试项目中的jar进行了比较,并且它们匹配。

Is there some way I can ask eclipse to reconcile the java classes in the remote JVM with the java classes in the local jars and make sure they correspond. 有什么办法可以让eclipse调和远程JVM中的Java类与本地jar中的Java类,并确保它们对应。 Or, perhaps, more specifically, whether the code associated with breakpoints I've set have actually be loaded into the remote JVM? 或者,也许更具体地说,与我设置的断点关联的代码是否实际上已加载到远程JVM中?

在有关Java项目的Java编译器属性页面上,检查是否都选中了类文件选项(您只需要前三个选项,而所有五个选项都被选中是调试的好选择)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM