简体   繁体   English

字节码增强后无法在Eclipse中调试

[英]cannot debug in eclipse after bytecode enhancement

We have a very old java project that consisted of some sub projects, in one of them it used a bytecode enhancer jdodoclet, the whole thing is built by ant script. 我们有一个非常老的java项目,它由一些子项目组成,其中一个子项目使用了字节码增强器jdodoclet,整个事情都是由ant脚本构建的。

Now whenever try to do debug of the project, once we go into classes of that particular project, we cannot only do a step into, but not step over, rendering debug pretty pointless. 现在,每当尝试对项目进行调试时,一旦进入该特定项目的类,我们就不能仅一步一步地进行调试,而不能单步调试,这使得调试变得毫无意义。

so when debug first starts, eclipse will give us a warning 因此,当首次启动调试时,eclipse会警告我们 警告Java断点

But it continues as normal. 但它仍照常进行。

and once we step into any classes of the program, eclipse cannot show us where we are in the source code nor the line number (ok, line number is the reason) 并且一旦我们进入程序的任何类,eclipse就无法告诉我们源代码中的位置或行号(好的,行号是原因)

没有行号

I did checked and double checked the compiler settings 我检查并仔细检查了编译器设置

在此处输入图片说明

and restarted eclipse. 并重新开始蚀。

but still it doesn't work. 但仍然不起作用。

Does anyone has any suggestion towards this problem? 有人对这个问题有什么建议吗?

You would have to recompile that code with debug information (line numbers) included, check this answer How to make Java compiler generate line numbers in compiled code . 您将不得不重新编译包含调试信息(行号)的代码,请检查此答案如何使Java编译器在已编译的代码中生成行号 The Eclipse setting is for that exactly purpose: when You compile Your code in Eclipse it will add debug info to generated .class files but it will not let You debug code compiled without this settings. Eclipse设置正是出于这一目的:当您在Eclipse中编译代码时,它将为生成的.class文件添加调试信息,但是如果没有此设置,它将不允许您调试编译的代码。

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

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