gwomacks / php-debug

Atom Text Editor package for PHP debugging
MIT License
119 stars 31 forks source link

Ability to add expressions to watch #286

Closed ghost closed 5 years ago

ghost commented 6 years ago

PhpStorm has a handy feature where you can evaluate arbitrary PHP expressions (sort of an eval) at the location where the breakpoint is triggered. I was wondering if something like that is possible here as well via xdebug?

PhpStorm shows a separate window where you can enter the expression and the result is displayed in a box below it. However, perhaps utilizing the watches pane would be sufficient and easier instead.

Really liking the new interface, thanks!

cchamplin commented 6 years ago

You should be able to evaluate expressions via the Console panel.

ghost commented 6 years ago

Thanks for the tip. I didn't see there was a text field there as my theme only accentuates them on hover (see screenshot below), perhaps a label would be nice :smile: .

test

Also, could you clarify how I should interact with this input box? I figured I could enter arbitrary expressions here, but they seem to have no effect other than being repeated. This was attempted whilst a breakpoint was triggered.

ghost commented 5 years ago

This is fixed, I can now - for some reason - enter arbitrary expressions in this box, which are then evaluated.