How to execute some function in eclipse while debugging a java program?

前端 未结 10 1904
耶瑟儿~
耶瑟儿~ 2021-01-30 04:01

Like firebug for debugging javascript,

is there such a feature in eclipse? or do I need a plugin?

相关标签:
10条回答
  • 2021-01-30 04:31

    Use the debug shell! Coming from node, I was pretty used to being able to mess with my env variables at any time using node --inspect in chrome, and so it was imperative for me to find the same experience in eclipse without having to use JDB.

    To open the debug shell, go to Window → Show View → Debug Shell

    After you write the code you wish to run, simply highlight it, right click, and execute (⌘U also works)

    0 讨论(0)
  • 2021-01-30 04:32

    You can use the Display view to execute commands while debugging. You can find this in Window -> Show View -> Display

    0 讨论(0)
  • 2021-01-30 04:37

    Select the line and press ctrl+shift+D or ctrl+shift+I This will give the result in a popup.

    0 讨论(0)
  • 2021-01-30 04:37

    You can also create a scrapbook page (a .jpage) file and type your code in there. Then click run. It looked slightly more convenient when I tried it.

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