Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A PDB hook for MacVIM

Project Description

Using this package one can enable a hook in the python pdb such that the current file is automagically opened in MacVim and the line is highlighted.


  • Activates MacVIM, uses new tab to open debugged file
  • reuses existing MacVIM instance
  • after loading the file, the terminal program is activated (given focus) to allow for rodent-free debugging.
  • The focus-switching is done using appscript which is a python package for AppleScript.


  • Mac OS X (duh)
  • MacVim (or another gui-enabled VIM which understands the VIM server commands – currently only MacVIM)


  • install this package

  • put something like this in your ~/.pdbrc:

    # save this in .pdbrc in your home directory
    from vimpdbhook import preloop, precmd
    pdb.Pdb.preloop = preloop
    pdb.Pdb.precmd = precmd
  • make sure that you have also installed the mvim command line utility for firing up macVIM using the terminal.

  • Currently, I assume that you use “iTerm” and use a variant of mvim called vimpdb (that’s my setup). Please see below.


The package uses the environment to fetch the name of the terminal app and the MacVIM launch script

Set this to your mvim script. default: vimpdb
Set this to the name of the terminal application. default: iTerm


Release History

This version
History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(2.6 kB) Copy SHA256 Hash SHA256
Source None May 28, 2010

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting