Hi Bram!

On Sa, 31 Jan 2015, Bram Moolenaar wrote:

> 
> Christian Brabandt wrote:
> 
> > Bram,
> > Charles asked me, if I could extend the vim debugger and add a watch 
> > feature, so it would be easier for him to debug netrw issues.
> > 
> > So here is the patch:
> > https://github.com/chrisbra/vim-mq-patches/blob/master/watchexpr
> > 
> > As far as I know, Charles has already tested it successfully.
> > Test suite is run successfully
> 
> Thanks, this sounds really useful!
> 
> It's not quite clear to me how this works:
> 
> :breaka[dd] expr {string}
>               Sets a breakpoint, that will break whenever the {string}
>               evaluates to true. Example: >
>                       :breakadd expr g:lnum
> 
> However, g:lnum is always true (non-zero).
> 
> Looking at the implementation, it seems that the previous value of
> g:lnum is stored and the break happens when the value changes.

Yes, that is what happens.

> Perhaps you can add a few more examples.  I would think it's also very
> useful to check the result of any expression.   e.g.:
> 
>       breakadd expr &tabstop == 4
> 
> Which would break just after 'tabstop' was set to 4 or to another value.
> Obviously this would be slow, evaluating the expression very many times,
> but manually finding this spot is much slower.

I had an earlier version, that worked like this. This had the drawback, 
that once the condition was fulfilled, it would break after every 
statement following it, so I changed it to break only when the values 
changes.

Best,
Christian
-- 

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui