Modify/view static variables while debugging in Eclipse

前端 未结 5 610
悲哀的现实
悲哀的现实 2020-12-02 14:08

As per the question. In the debug view, there\'s the Variables frame. It shows all the values of member variables of the current object, and all of the local variables, but

相关标签:
5条回答
  • 2020-12-02 14:23

    You might also try writing the expression e.g. self::$value in the watch window

    0 讨论(0)
  • 2020-12-02 14:26

    In the Debug Variables view their is a arrow button in the right of the view. the tooltip of this button is Menu.

    When you click this button a drop down menu is shown where you can select

    Java -> Show static variables

    Note: You do not have to restart Eclipse.

    enter image description here

    0 讨论(0)
  • 2020-12-02 14:30

    Simply put your mouse cursor over the static variable in the code and you will see the assigned value.

    0 讨论(0)
  • 2020-12-02 14:30

    Window -> Show View -> Other -> Debug -> Expressions -> Right Click on Window -> Add Watch Expression... -> Enter the name of the variable you want to see

    0 讨论(0)
  • 2020-12-02 14:48

    You can view static variable and also edit during runtime. Click on small arrow pointing downword. see below image

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