Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » modify static vars in debugger?
modify static vars in debugger? [message #238137] Wed, 15 November 2006 18:18 Go to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

Suppose I have this:

class A {
private static boolean b = false;
public void foo() {
if (b)
System.out.println("Hello, world!");
}
}

Now suppose I step into foo(). How can I modify the value of b? It doesn't
seem to show up in the "variables" pane of the debugger, because it's
static. I can right-click on it and Inspect or Display it, but I don't see
how to modify it from there.

I'm sure I'm missing something obvious, but what is it?

Thanks!
Re: modify static vars in debugger? [message #238144 is a reply to message #238137] Wed, 15 November 2006 19:43 Go to previous messageGo to next message
Eclipse UserFriend
Walter Harley a écrit :
> Now suppose I step into foo(). How can I modify the value of b? It doesn't
> seem to show up in the "variables" pane of the debugger, because it's
> static. I can right-click on it and Inspect or Display it, but I don't see
> how to modify it from there.
>
> I'm sure I'm missing something obvious, but what is it?
In the variable view, click on the menu (small arrow top-down)>Java>Show
Static Variables.
HTH,
--
Olivier
Re: modify static vars in debugger? [message #238146 is a reply to message #238144] Thu, 16 November 2006 03:16 Go to previous message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Olivier Thomann" <olivier_thomann@ca.ibm.com> wrote in message
news:ejgc75$at6$1@utils.eclipse.org...
> In the variable view, click on the menu (small arrow top-down)>Java>Show
> Static Variables.

Thanks!
Previous Topic:Run console app outside of IDE?
Next Topic:Using libraries packaged in a plugin from a Java project
Goto Forum:
  


Current Time: Fri Sep 26 01:59:29 EDT 2025

Powered by FUDForum. Page generated in 0.04364 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top