Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

java

eclipse

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?

like image 865
Howard Avatar asked Aug 02 '12 15:08

Howard


People also ask

What is the console in Eclipse?

The Console view displays the output of the utilities invoked when building a project or the programs output when running/debugging. Click Window > Preferences. Expand C/C++ and Build, then click Console. To display information on the latest build only, select the Always clear console before building check box.

What is the use of debug in Eclipse?

Eclipse allows running an application in Debug mode which helps with stepping through each line of code in a program. Eclipse also provides a Debug Perspective which is a set of views grouped together that help inspect code and make the debugging process very effective.

How do I open debug console in Eclipse?

A Java program can be debugged simply by right clicking on the Java editor class file from Package explorer. Select Debug As → Java Application or use the shortcut Alt + Shift + D, J instead.

How do I use console log in Eclipse?

On the menu bar in eclipse, go to Window->Show View->Console. When you run the program, that console window should be where your System.


2 Answers

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).

like image 155
mmey Avatar answered Sep 22 '22 11:09

mmey


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).

like image 39
deleted_user Avatar answered Sep 19 '22 11:09

deleted_user