Pyclewn Vim logo gdb logo python logo

Download

Get the latest version 1.11

Documentation

Support

Please help

Les Chemins de Lokoti

Links

Get pyclewn at SourceForge.net. Fast, secure and Free Open Source software downloads

Pyclewn allows using vim as a front end to a debugger. Pyclewn currently supports gdb and pdb.

The debugger output is redirected to a vim window, the pyclewn console. The debugger commands are mapped to vim user-defined commands with a common letter prefix, and with completion available on the commands and their first argument.

When pyclewn is started from vim with the :Pyclewn command on unix, the :Cinferiortty command launches a terminal connected to a pseudo terminal that becomes the controlling terminal of the program being debugged by gdb or by pdb.

Features

  • A debugger command can be mapped in vim to a key sequence using vim key mappings. This allows, for example, to set/clear a breakpoint or print a variable value at the current cursor or mouse position by just hitting a key.
  • Breakpoints and the line in the current frame, are highlighted in the source code. Disabled breakpoints are noted with a different highlighting color. Pyclewn automatically finds the source file for the breakpoint if it exists, and tells vim to load and display the file and highlight the line.
  • Multiple consecutive pyclewn sessions can be started from within vim with the :Pyclewn command.
  • The value of an expression or variable is displayed in a balloon in gvim when the mouse pointer is hovering over the selected expression or the variable.

pdb

  • Pyclewn is a front-end to pdb-clone. With breakpoints pyclewn runs just above the speed of the python interpreter (the command line python debugger, pdb, runs at 10 to 100 times the speed of the interpreter).
  • Similarly to gdb, one may attach to a running python process with the pdb debugger, interrupt the process, manage a debugging session and terminate the debugging session by detaching from the process. A new debugging session may be conducted later on this same process, possibly from another Vim instance.

gdb

  • An expression can be watched in a vim window. The expression value is updated and highlighted whenever it has changed. When the expression is a structure or class instance, it can be expanded (resp. folded) to show (resp. hide) its members and their values.
  • A sequence of gdb commands can be run from a vim script when the async option is set. This may be useful in a key mapping.
  • The project command saves the current gdb settings to a project file that may be sourced later by the gdb source command. These settings are the working directory, the debuggee program file name, the program arguments and the breakpoints. The sourcing and saving of the project file can be automated to occur on each gdb startup and termination, with the project command line option.

Comparison of clewn, vimGdb and pyclewn

The following table lists the differences between clewn, vimGdb and pyclewn (clewn and vimGdb are hosted at clewn).

  vimGdb clewn pyclewn
platform unix unix

all unix platforms supported by python - requires GNU gdb from macports on Mac Os X

Windows (python 3 only)

language C C

python 2.4 and above

python 3

C language for the pdb-clone python extension module, _bdb

vim mode vim in a terminal, gvim gvim gvim and vim in a terminal (vim 7.3 or above required)
vim interface a vim patch a standalone program connected to gvim with a netbeans socket

a standalone program connected to vim with a netbeans socket

pyclewn may be started from within vim since vim 7.3

vim version a different patch for each vim version vim 6.3 and above vim 7.0 and above
debuggers gdb gdb gdb, pdb
gdb features  
  • watched variables
  • project file
  • tight integration with vim
  • gdb/mi interface
  • asynchronous gdb commands
  • watched variables
  • project file
pdb features    
  • interrupt the debuggee
  • attach to a running python process
  • the threadstack command

Licensing

This software is licensed under the GNU General Public License Version 2.

Copyright © 2001-2012 Python Software Foundation; All Rights Reserved. pdb-clone is a derivative work of a part of Python and as such, subject to the python license.