{"id":13651982,"url":"https://github.com/gotcha/vimpdb","last_synced_at":"2025-04-07T13:07:59.569Z","repository":{"id":816819,"uuid":"527488","full_name":"gotcha/vimpdb","owner":"gotcha","description":"Pdb and Vim integration","archived":false,"fork":false,"pushed_at":"2017-02-19T09:58:36.000Z","size":172,"stargazers_count":201,"open_issues_count":7,"forks_count":22,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-05-11T05:42:01.186Z","etag":null,"topics":["pdb","python","vim"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gotcha.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.txt","contributing":null,"funding":null,"license":"MIT-LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-02-20T14:54:20.000Z","updated_at":"2024-04-17T01:40:48.000Z","dependencies_parsed_at":"2022-08-16T11:00:36.413Z","dependency_job_id":null,"html_url":"https://github.com/gotcha/vimpdb","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotcha%2Fvimpdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotcha%2Fvimpdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotcha%2Fvimpdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotcha%2Fvimpdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gotcha","download_url":"https://codeload.github.com/gotcha/vimpdb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657281,"owners_count":20974345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pdb","python","vim"],"created_at":"2024-08-02T02:00:54.079Z","updated_at":"2025-04-07T13:07:59.549Z","avatar_url":"https://github.com/gotcha.png","language":"Python","funding_links":[],"categories":["Debuggers"],"sub_categories":[],"readme":"===================\nVIM Pdb integration\n===================\n\nAbstract\n========\n\nThis package provides an integration of the Python debugger ``pdb`` into the\nVIM editor.\n\n.. image:: https://secure.travis-ci.org/gotcha/vimpdb.png\n\n.. contents:: Table of contents\n\nUsage\n=====\n\nPython code\n-----------\n\nUsing **vimpdb** is easy -- just insert a call to ``set_trace`` in your code\nalmost as usual::\n\n    import vimpdb; vimpdb.set_trace() \n\nThen start your python application/script.\n\nWhen the python interpreter hits that line, **vimpdb** will launch a VIM \ninstance. VIM should get the focus; it loads the source file at the right line.\n\nVIM commands\n------------\n\nIn VIM, you may now use the following commands:\n\n.. csv-table:: **vimpdb** commands\n    :header-rows: 1\n\n    Ex Command, Key binding, Details\n    ``:PDBNext``, ``n`` , ``pdb`` (n)ext\n    ``:PDBStep``, ``s`` , ``pdb`` (s)tep \n    ``:PDBArgs``, ``a`` , ``pdb`` (a)rgs\n    ``:PDBUp``, ``u`` , ``pdb`` (u)p\n    ``:PDBDown``, ``d`` , ``pdb`` (d)own\n    ``:PDBReturn``, ``r`` , ``pdb`` (r)eturn\n    ``:PDBContinue``, ``c`` , ``pdb`` (c)ontinue\n    ``:PDBBreak``, ``b`` , Sets a breakpoint at the line on which the cursor is sitting; similar to ``pdb`` b(reak)\n    ``:PDBClear``, ``B`` , Clears a breakpoint at the line on which the cursor is sitting; similar to ``pdb`` cl(ear)\n    ``:PDBWord``, ``w`` , Evaluates the value of the identifier on which the cursor is sitting.\n    ``:PDBEval``, ``?`` , Evaluates a Python expression after having asked for it.\n    ``:PDBReset``, ``x`` , Switch back to normal debugging in shell with standard ``pdb``.\n    N/A, ``v(im)`` , Switch back to **vimpdb**; only in plain ``pdb``.\n\nStandard ``pdb`` hook\n---------------------\n\nIf you find it hard to change habits and keep on typing \n\n::\n\n    import pdb; pdb.set_trace()\n\nyou can add the following line to the  ``.pdbrc`` file sitting in your home\nfolder::\n\n    import vimpdb; vimpdb.hookPdb()\n\nThis way, the command ``v(im)`` mentioned above is added to your standard \n``pdb`` and you can switch to **vimpdb** at any time.\n\nRequirements\n============\n\n**vimpdb** has been used successfully under Linux, Mac OSX and Windows.\n\nIt **is compatible** with Python 2.7, 2.6, 2.5 and 2.4. \nIt **is not compatible** with Python 3.1 (it should be the same for 3.0).\n\n**vimpdb** requires an installation of VIM that supports both ``python`` and\n``clientserver`` options.\n\nFind out if it is the case by issuing the following command at the VIM prompt::\n\n    :version\n\nIf the options are supported, you will see ``+clientserver`` and ``+python`` in the\noutput. In the opposite case, you will see ``-clientserver`` or ``-python``.\n\nOn Linux and Windows, the default VIM build should already be server-enabled.\n\nOn Windows, the ``python`` option compiled in VIM depends on a specific Python\nversion. Find out if that specific version is installed and works in VIM by\nissuing the following command at the VIM prompt::\n\n    :python import sys; print sys.version\n\nOn Mac OSX, you'll want to use MacVIM_. MacVIM also has the ``python`` option \ncompiled in by default.\n\n.. _MacVIM: http://code.google.com/p/macvim/\n\nInstallation\n============\n\nStandard installation with ``easy_install`` ::\n\n    $ easy_install vimpdb\n\nYou can obviously also use ``pip``.\n\n    If you look inside the package, you will see a VIM script file: ``vimpdb.vim``.\n    Do **not** move it to VIM configuration directory (like ``~/.vim/plugin``).\n    **vimpdb** knows how to make the script available to VIM.\n\nConfiguration\n=============\n\nShort story\n-----------\n\n**vimpdb** tries to avoid depending on any user configuration.\nIf it cannot detect the right configuration by itself, \nit will ask a few questions which you should be able to answer easily.\n\nLong story\n----------\n\nWhen launched, **vimpdb** looks for its RC file : ``~/.vimpdbrc``. If it does\nnot find it, **vimpdb** creates that file for you from default values.\n\n**vimpdb** tries a set of default values that should work.\nIt checks if those default values are appropriate.\nIf the default values do not work, **vimpdb** asks for other values \ninteractively until it has checked that the values provided actually work.\n\nThe default values per OS are listed hereunder.\n\nFor Linux::\n\n    [vimpdb]\n    vim_client_script = vim\n    vim_server_script = gvim\n    server_name = GVIM\n    port = 6666\n\nFor MacOSX::\n\n    [vimpdb]\n    vim_client_script = mvim\n    vim_server_script = mvim\n    server_name = VIM\n    port = 6666\n\nFor Windows::\n\n    [vimpdb]\n    vim_client_script = vim.exe\n    vim_server_script = gvim.exe\n    server_name = VIM\n    port = 6666\n\nSee below for details about each option.\n\nYou are obviously allowed to create and tune that RC file.\nNevertheless, the RC file should hold values for all 4 options.\nIf one of them is missing, **vimpdb** breaks and complains accordingly.\n\n\nVIM client script - ``vim_client_script``\n-----------------------------------------\n\nTo communicate with the VIM instance where debugging happens,\n**vimpdb** needs to launch another VIM instance in client mode. \n\n``vim_client_script`` option holds the script used to launch that VIM instance \nwith ``clientserver`` support.\n\nOn Windows, it should hold ``vim.exe``, **not** ``gvim.exe``.\nFurthermore, do **not** include quotes in the value to take care\nof whitespace in the path.\n\nVIM server script - ``vim_server_script``\n-----------------------------------------\n\nIn case no VIM instance is running, **vimpdb** launches a VIM instance in\nserver mode.\n\n``vim_server_script`` option holds the script used to launch that VIM instance\nwith ``clientserver`` support. As debugging in the VIM instance is written with\npython, that instance must have ``python`` support.\n\nOn MacOSX and Linux, ``vim_server_script`` and ``vim_client_script`` can hold \nthe same value.\n\nOn Windows, only the graphical VIM can be used as server, reason for the two \nseparate default values as seen above.\n\nServer Name - ``server_name``\n-----------------------------\n\nThe VIM instance in server mode has a name.\n\nBy default, **vimpdb** speaks to the server named ``VIM``, which  \nis the default ``servername`` used by VIM.\n\nIf you want **vimpdb** to use another server name, modify the \n``server_name`` option. It should hold the name of the VIM\nserver you want to be used for debugging. \n\nYou may list the currently running VIM servers using::\n\n    $ vim --serverlist\n    VIM\n\nOr, on a Mac::\n\n    $ /Applications/MacVim.app/Contents/MacOS/Vim --serverlist\n    VIM\n\nWhen a VIM instance with ``clientserver`` support is running, you can find its \nname by issuing the following command at the VIM prompt::\n\n    :echo v:servername\n\nUDP Port - ``port``\n-------------------\n\nVIM communicates to **vimpdb** through a UDP socket. \nBy default, the socket is opened on port 6666.\n\nIf that socket is not available in your system, you can specify an available\nport number with the ``port`` option.\n\nKnown issues\n============\n\nNone for now.\n\nBackward Compatibility\n======================\n\nBefore version 0.4.1, **vimpdb** RC file (``~/.vimpdbrc``) had a single \n``script`` option. That option has been turned into the ``vim_client_script``\noption. The upgrade should be transparent.\n\nBefore version 0.4.0, **vimpdb** was configured through environment variables.\nIf you had a working configuration, upgrade should be transparent.\nThe values of ``VIMPDB_SERVERNAME`` and ``VIMPDB_VIMSCRIPT`` environment\nvariables are setup in the RC file (``~/.vimpdbrc``). \nThey are put respectively in ``server_name`` and ``script`` options.\n\nFixed issues\n============\n\nSee changelog_\n\n.. _changelog: http://pypi.python.org/pypi/vimpdb#id1\n\n..  vim: set ft=rst ts=4 sw=4 expandtab tw=78 : \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgotcha%2Fvimpdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgotcha%2Fvimpdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgotcha%2Fvimpdb/lists"}