Howard
Howard

Reputation: 19805

What is the use of Interactive Console in Eclipse (Debug view)

Some threads asked how to use the "Interactive Console" in Eclipse since you cannot type anything in this console.

Some suggested you can "Display view" to execute code.

So what is the purpose of the "Interactive Console" then?

Upvotes: 13

Views: 14484

Answers (3)

Bharat Sinha
Bharat Sinha

Reputation: 14363

EARLIER ANSWER (accepted but not correct) :

The interactive console allows you to execute some extra code, while debugging, when stopped at via a `breakpoint`.

This is a really beneficial feature when you are debugging and suddenly want to change the value of variable, execute a sysout or some utility function. 

FOR Correct Answer look at the answer below by @mmey.

Upvotes: 2

deleted_user
deleted_user

Reputation: 3805

Im sorry but the accepted answer is not correct.

The console in Eclipse is interactive, when a running application reads from the Console Input Stream.

It is not meant to be a feature of Eclipse to generally aid in debugging, it is meant to allow console based Java applications to read input from the user when debugging (as in I can type into a console prompt).

Upvotes: 6

mmey
mmey

Reputation: 1685

Eclipse doesn't have an "Interactive Console" in it's default installation. It just has a "Display" view that you can use to execute Java code in debug mode in the scope of the current breakpoint (to evaluate expressions or to change data)

If you have an "Interactive Console", it's most likely a view from a plugin. I've read that a Google plugin might provide it. Or maybe a plugin for a scripting language like JRuby or Groovy.

If you say you have an "Interactive Console" and cannot type into it, then I suspect you're not in the right mode for the view to be active (maybe you're not working with the scripting language that provides the view).

Upvotes: 27

Related Questions