pygdb : pygtk interface to gdb in connection with (g)vim
script karma |
Rating 4/1,
Downloaded by 1822 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Stefan Huber |
|
script type |
utility |
|
description |
pygdb is a pygtk interface to gdb. It offers two terminal windows, one for gdb, one for the process to be debugged. On the top it has standard buttons like run, continue, step in, step over, step out and quit. On a second window you can add watches and breakpoints. Furthermore, you can inspect the backtrace and launch gvim on the current executed line by pressing a button.
pygdb stays synchronized with gvim (by using gvim --servername calls). The package provides a pygdb.vim which enables the user to set (conditional) breakpoints and the current execution line is highlighted as well.
Default key mappings:
F5: Run
F8: Toggle breakpoint
S-F8: Conditional breakpoint
F9: Show breakpoints
S-F9: Load config
The package is in a very young state but I guess it is more or less usable. You may want to give it a try or look for some screenshots at
http://www.cosy.sbg.ac.at/~shuber/code-pygdb.php
at first. This project is somehow similar to vdb (vimscript #1703). The main difference is that vdb tries to integrate gdb completely into vim, in contrast to pygdb. However, under some assumptions on the debugger, other debuggers can be integrated easily as well. (Just inherit the DbgTerminal python class)
P.S. I don't have gvim-6 -- is anyone experiencing that the script works with vim-6 as well? |
|
install details |
INSTALL.txt:
1. Put the pygdb directory to somewhere, lets call it <dir> in this help file.
2. Add the following lines into your ~/.vimrc:
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" pygdb
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
autocmd Filetype c,cpp :python import sys
autocmd Filetype c,cpp :python import vim
autocmd Filetype c,cpp :python pygdbdir = "<dir>"
autocmd Filetype c,cpp :python sys.path.append(pygdbdir)
autocmd Filetype c,cpp :python vim.command("source %s/pygdb.vim" % pygdbdir)
autocmd Filetype c,cpp call GDBMapDefaults()
where you replace <dir> by the corresponding path of pygdb. You may want to
add <dir> to the environment variable PATH such that you can call pygdb
from console directly. |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.224.59.3
|