title: Modify static variables while debugging in Eclipse
body: <p>As an extension the the question &quot;<a href="https://stackoverflow.com/questions/801193/modify-view-static-variables-while-debugging-in-eclipse">Modify/view static variables while debugging in Eclipse</a>&quot;, I'd like to be able to modify static variables while debugging in Eclipse.</p>
  <p>For instance and local variables, I can just choose the variable in the &quot;Variables&quot; view of Eclipse, and use the context menu &quot;Change value...&quot; to change the value.</p>
  <p>This is not possible for arbitrary static variables, because they do not appear in the &quot;Variables&quot; view.</p>
  <p>What I tried:</p>
  <ol>
  <li>If you choose &quot;Java / Show static variables&quot; from the triangle menu in the &quot;Variables&quot; view, you can see and modify static member variables of the variables listed in the &quot;Variables view&quot;. However, I did not find how to access a static member of a class whose instance does not appear in the &quot;Variables view&quot;.</li>
  <li>You can of course enter a static member as an expression into the &quot;Expression view&quot; (using fully qualified name). Then you can see the value, but the &quot;Expression view&quot; does not have an option to modify the value (it <em>does</em> allow to modify members of an expression, but not the expression itself, even if the expression is a field).</li>
  </ol>
  <p>So, if I have a static variable like a boolean MyClass.disableAllBugs, is there a way to change MyClass.disableAllBugs during debugging?</p>
  <p>As an aside: I realize that even having public mutable static fields (i.e. mutable global variables) is very bad style. But some codebases have it, and then it's sometimes useful to modify it while debugging.</p>