How can I connect to a process using gdbvim?

I use Vim as my main IDE for programming, with some plugins I have a good environment, but for one point: debugging.

I recompiled Vim to use vimgdb and it works, but the problem is I need to connect to the process started by the root user, so I have to use sudo to do this.

How can I do this using vimgdb?

Thanks in advance.

+2


a source to share


2 answers


Well, the most obvious way - but probably not exactly what you're looking for - is to run vim as root to begin with. Then you don't have to worry about it by switching to the root user for debugging. He will already be there.



0


a source


Since I haven't used vimgdb yet, I don't have an answer to your question. But I think you could find a solution by referring to the implementation of the SudoEdit plugin, which handles the file read / write problem with the sudo command.

http://www.vim.org/scripts/script.php?script_id=2709



Hope it helps.

0


a source







All Articles