Short Articles

Xdebug: vim stopping on the first line of the script when using vdebug

Vim editor

If you are using vdebug and you are facing the situation where vim is stopping in the first line of any script you want to debug (or if you want it to actually stop), make sure to modify the following value in your .vimrc file:

let g:vdebug_options.break_on_open = 0

As the official documentation states:

This determines whether the debugger should stop on the first line of the script, or just immediately start running until it hits a pre-defined breakpoint.

After adjusting the variable, reload your ~/.vimrc by relaunching vim or by typing the following command while using it:

:so $MYVIMRC

And that’s it, you’ll your editor behaving as you intended.

Here’s a copy of my .vimrc file, in case you’d like to use it as a starting point for your own.

Tagged , , , ,

Leave a Reply

Your email address will not be published.