joonty/vdebug — pull request #193 by benjifisher (2014-12-24 04:56:15+00:00)
Title: Allow for persistent code evaluation in the watch window.

After `:VdebugEval! expression`, continue to evaluate `expression` in the watch window after running through the code. Clear with `:VdebugEval!`.

Here is my use case. I set a breakpoint, and the watch window is filled with so many variables that I have to scroll to see the one I want. So I do `:VdebugEval array($myvar->property17, $myvar->property34)`. I run the code, and the same local variables fill the watch window. I know I can use `@:`, to repeat the `:Vdebug` command, but I want to save a few keystrokes.

This patch provides a `:Vdebug!` variant. After `:Vdebug! expression`, the watch window will continue showing `expression` as I step through the code or run to a breakpoint. I can use `` or `:python debugger.get_context()` to get the usual display, but `expression` will return if I run the code again. To return to the usual behavior, use `:Vdebug!` (with no `expression` argument).

If you like this idea, then I will complete it by adding tests and documentation. (I have not looked at the tests yet, but I think I can figure out how to do it.)

I know vim pretty well, but I am a novice at python, so I will be grateful for any advice or (constructive) criticism.