Skip to content

debug ~/.vimrc #16

@albfan

Description

@albfan

By now it's not possible because window is registered after ~/.vimrc execution

check it with

$ vim --startuptime -V9vim.log

then search for "~/.vimrc" and "register servername"

vimrc definition:
https://github.com/vim/vim/blob/fc53ec1e9aac682a8524698240ed2bb6f7b0e300/src/os_unix.h#L288

message about registering server:
https://github.com/vim/vim/blob/master/src/main.c#L3630

call to source scripts:
https://github.com/vim/vim/blob/master/src/main.c#L626
https://github.com/vim/vim/blob/master/src/main.c#L3021

call to register server:
https://github.com/vim/vim/blob/master/src/main.c#L801

"do_source" happens before "prepare_server", no way to use breakpts by now. It would be cool to propose a change in call order and test

$ vim --servername vimrcdebug -c "breakadd ~/.vimrc"

or

$ vim --servername vimrcdebug -D

then in another terminal

$ vim

:BreakPts
:BPRemote VIMRCDEBUG
:BPDWhere

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions