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

后端 未结 3 1078
有刺的猬
有刺的猬 2021-02-19 13:57

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 c

相关标签:
3条回答
  • 2021-02-19 14:21

    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.

    0 讨论(0)
  • 2021-02-19 14:29

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

    0 讨论(0)
  • 2021-02-19 14:42

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

    0 讨论(0)
提交回复
热议问题