Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 306
Miss Cellanie Avatar asked Oct 25 '22 23:10

Miss Cellanie


1 Answers

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.

like image 187
Eli Acherkan Avatar answered Nov 02 '22 20:11

Eli Acherkan