ActiveState Powered by ActiveState

ActiveState Community


examining variables/running commands within the debugger context

Posted by ccurvey on 2007-08-02 04:44

I've got my PHP script running in the debugger, thanks for the help.

Now I'd like to be able to run commands to examine my environment when I'm at a breakpoint. For example, I'd like to run "myfunction(123)" to see what is returned by "myfunction." But I can't seem to find a window to do that in.

On a related note, I'd like to be able to examine variable contents directly (just by typing "echo $foobar"). I'd assume this would be in the same place. I see the list of variables in the bottom-left pane, but I can't figure out how they're sorted.

Many thanks!

-Chris

ToddW | Thu, 2007-08-02 10:08

There is no interaction mode for Komodo's PHP debugging, although I'd suggest you make an enhancement request here (I think it would be a nice feature to add):
http://bugs.activestate.com/query.cgi?product=Komodo

In order to achieve what you want, you'll need to do this using the variable or watch debugger window (note: you'll need a dummy/spare/undefined variable to play with). Once you've started debugging, in the variable list, double-click on the dummy variable to popup a dialog to change the value of the variable. Change the value to be "myfunction(123)" and also check the "Interpret as Expression" checkbox. When you click OK the value of the function call will be propagated to the variable.

Note: You can add watch variables (in the Watch tab), to just see the variables your interested in.

I believe there is a bug as the variables are not getting sorted correctly.
http://community.activestate.com/forum-topic/php-debug-variable-sortin

Cheers,
Todd

-->