Change variable value eclipse in debug perspective at run time

Viewed 58912

it's a long time since I used Eclipse Helios, and I found some difficult in changing variable at run time during debug.

I have put a breakpoint, and when debugger stops there it shows the object I am looking for in the 'variable' panel, which appears when in debug perspective.

The value I am trying to change is a Boolean inside the object, however these are the unsuccessful tentatives I did:

  1. Expanded the object, look for variable expanded it until it shows value, changed value to false: this results in changing all the boolean in the object
  2. Add watch expression to the boolean variable, but then I wasn't able from there to find a way to change its value

don't know if it is relevant, the application I am debugging is running on an old jboss 5.1, and the debug itself is done by running jboss in debug mode, and connect trough eclipse with a debug configuration. All is installed on my localhost.

thanks

6 Answers

Following steps worked for me:

  1. Click on Window -> Open Perspective -> Debug

  2. Click on Tab Variables.

  3. Right click the variable for which you want to change the value and click on Change Value...

  4. Set the Value as Boolean.TRUE in the dialogue and click Ok.

Select that variable and press Ctrl + Shift + I to open Inspect View, then press the same keys combination to open Expression View. You can change its value there.

Related