简体   繁体   中英

toString() unavailable error in Eclipse debugger

While stepping through a method using the Eclipse debugger, I started seeing "toString() unavailable - no suspended threads" for all the variables I wanted to inspect.

Why did I get that error, and what should I do next to narrow down the problem in my code?

edit My code does create a new process, but the variables I wanted to examine exist in the main application thread, and that thread didn't appear dead (in the Debug panel or the Console).

I'm using Eclipse 3.4.

I can think of a few scenarios when a method (in particular, toString() ) would be unavailable:

  • When the execution is suspended by pressing the "Suspend" button (the one with the "pause" icon), as opposed to reaching a breakpoint.
  • When you've reached a breakpoint, and you're in the middle of evaluating an expression.

In any case, even with toString() unavailable, you should be able to inspect the current values in the upper part of the "Variables" view.

Also, try looking at the relevant preferences (Window → Preferences → Java → Debug), in particular the ones under "Detail Formatters". You can also try the "Restore Defaults" button.

This sounds like a bug in early versions of Eclipse 3.1: https://bugs.eclipse.org/bugs/show_bug.cgi?id=81249

Try upgrading your Eclipse?

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