Subscribe to RSS Feed

This powerful Firebug's feature, which you can download from the internet, could be also called Edit value and continue (to use similar terminology from Visual Studio). Even if Firefox (and so Firebug) doesn't allow to edit the code itself at run-time, being able to change value of a variable while sitting at a breakpoint in the debugger is often very useful way how to check proper behavior of your code.

Let's see a simple example:

The debugger is halted at a debugger keyword (see another related tip) and the Watch panel shows that value of the message variable is Hello.

Double click on the variable in the Watch panel opens an inline editor, which allows to change its value (double-clicking on a boolean value would automatically toggle the value).

Change the value, press enter key and consequently F5 to resume the debugger. You'll see that the new value has been dynamically applied.

Note that you can edit only primitive values, but not matter where they are actually stored. They might live within global or local variables, objects or within arrays.

Check summary of all Firebug tips.


Rss Commenti

3 Comments

  1. [...] Software is hard | Firebug Tip: Modify variable value at runtime: Software is hard | Firebug Tip: Modify variable value at runtime [...]

    #1 Software is hard | Firebug Tip: Modify variable value at runtime | WordBuff.in
  2. Why does your low-content phrase "which you can download from the _internet_" contain an irrelevant link to http://www.o2.co.uk /broadband/ipad-tariff-data-plans ? Is your blog being spammed? If you're getting money for the links, no problem, and thanks for Firebug.

    #2 skierpage
  3. [...] answers:That error means that the matrix is not square, i.e. Not nxn.Powered by Yahoo! AnswersThomas asks…What is the steps of putting matrices in a TI-84 graphing calculator?waimate answers:S...>waimate answers:Simply put: Press [2nd][x?¹](Matrix). Press the left arrow to move to the Edit [...]

    #3 Your Questions About Putting Matrices In A Calculator | Indoor Putting Greens

Sorry, the comment form is closed at this time.