Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 766219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T17:00:47+00:00 2026-05-14T17:00:47+00:00

As an extension the the question " Modify/view static variables while debugging in Eclipse

  • 0

As an extension the the question "Modify/view static variables while debugging in Eclipse", I’d like to be able to modify static variables while debugging in Eclipse.

For instance and local variables, I can just choose the variable in the "Variables" view of Eclipse, and use the context menu "Change value…" to change the value.

This is not possible for arbitrary static variables, because they do not appear in the "Variables" view.

What I tried:

  1. If you choose "Java / Show static variables" from the triangle menu in the "Variables" view, you can see and modify static member variables of the variables listed in the "Variables view". However, I did not find how to access a static member of a class whose instance does not appear in the "Variables view".
  2. You can of course enter a static member as an expression into the "Expression view" (using fully qualified name). Then you can see the value, but the "Expression view" does not have an option to modify the value (it does allow to modify members of an expression, but not the expression itself, even if the expression is a field).

So, if I have a static variable like a boolean MyClass.disableAllBugs, is there a way to change MyClass.disableAllBugs during debugging?

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T17:00:48+00:00Added an answer on May 14, 2026 at 5:00 pm

    You can write a temporary line SomeClass.myStaticVar = newValue;, select it, right-click and “execute” it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is an extension for this question asked an hour ago. We cannot modify
As a follow-up to my state machines as a C++-like language extension question, I'd
I have an extension to this question: Vb6 "Tag" property equivalent in ASP.Net? The
Ok, this question is an extension of this question Java Strings: "String s =
My question can be claimed to be an extension/similar to the question posted here
This maybe extension from the question: Incorporate variables into bash code line I just
this is my Question extension to this Question .. Here I am able to
This is an extension of question: Order of the initialization in Java so in
this question is an extension of the question here i tried to extend Dane's
As an extension to this question here Linking JavaScript Libraries in User Controls I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.