简体   繁体   中英

Why I can't set a breakpoint in some of the Java source file (readonly source of plugin jar) in eclipse?

I'm tracing into eclipse LTK plugin. I could set a breakpoint in some of the readonly java source for LTK. (for example ProcessorBasedRefactoring.java)

在此输入图像描述

However, I couldn't set a breakpoint in some source files. (for example JavaRenameProcessor).

在此输入图像描述

When I tried to set a method breakpoint, I got "Cannot create method breakpoint, method signature not available." error message.

What might be wrong? Why I can't set a breakpoint in some of the (binary) Java source file? 在此输入图像描述

ADDED:

For a simple workaround to this issue, I just set a breakpoint wherever possible, and then open the java source to click a line. Then, I can use command-R so that eclipse executes up to the line that I point to.

ADDED2:

The breakpoint was there, but eclipse doesn't show it.

在此输入图像描述

The other thing that I noticed was that the java file, just disappears from the IDE when I restart the debugger. And even when I reopen it in eclipse. 在此输入图像描述

I got this error message - "zip file closed". 在此输入图像描述

And then I can see the source code only when I trace into the method that the java source contains.

我相信该类是在没有调试信息的情况下编译的和/或字节代码是混淆的。

  1. Download java source code from open source website, the file's form is XXX.zip , not XXX.jar .
  2. Build path -->c onfigure build path, enter the page, choose libraries, and open a jar file, find "Source attachment", and choose it, you can find a button is named "Edit" on the right, click it, and type the xxx.zip what you downloaded path into it.
  3. back to your debug page, continue your work

Good luck! I hope my answer can help you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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