tags:

views:

71

answers:

2

Hi,

I use Vim as primary IDE for programming, with some plugins i have a good environment but for a single point: debugging.

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

How can i do this with vimgdb?

Thanks in advance.

A: 

Well, the most obvious way - but probably not really what you're looking for - would be to run vim as root to begin with. Then you wouldn't have to worry about it switching to the root user for debugging. It would already be there.

Jonathan M Davis
A: 

Since I haven't used the vimgdb yet, I don't have the answer for your question. But, I guess you might be able to find a solution by referring to the implementation of SudoEdit plugin which handles the issue of reading/writing a file using the sudo command.

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

Hope that helps.

Zhaojun