Watching variables is a common task programmers wish to employ when debugging. Usually the scenairo is that you want to know why a certain variable gets a certain value.
To add a variable to the watch list, first select the Watch tab on the bottom left of Komodo. Now click the square dotted icon with the yellow highlight on the top left of it. This will bring up the following dialog. In here type the variable name you wish to add to the watch list.
Now we can debug as normal, I've added a breakpoint just after the $return variable gets set.
After clicking the Go/Continue debugger command button, the execution breaks at the next break point. Whenever any of our watched variables get changed, the watch window updates. So here we can now see the current value of $return.
But that is not all. With Watch we can change the value of a watched variable thus changing how the rest of the program will execute. To do this click on the variable in the Watch window, then click on the pencil icon. (It is the one to the left of the add watch variable icon).
Watch is useful though its features are covered by the
Locals and
Globals tabs, however sometimes you just want to focus on a small subset of variables so watching just the one you are interested in is alot easier than having to watch the whole set of variables in your program.
Recent comments
3 hours 20 min ago
3 hours 30 min ago
3 hours 39 min ago
4 hours 54 min ago
5 hours 56 min ago
6 hours 12 min ago
6 hours 46 min ago
7 hours 47 min ago
7 hours 51 min ago
8 hours 58 min ago