Winpdb not found on plugin in ST3 on OS X 10.10.2

Issue #6 new
Jim Klo
created an issue
  1. I've installed the Plugin Debugger via Package Control.
  2. I've installed Winpdb 1.4.8 using pip2 install http://winpdb.googlecode.com/files/winpdb-1.4.8.tar.gz
  3. I've installed all Winpdb dependencies and can launch Winpdb from a terminal.
  4. I've edited my Plugin Debugger.sublime-settings to contain the following:
{
    "plugin_debugger_python": "/usr/local/Cellar/python/2.7.9/bin/python"
}
  1. I add the import spdb ; spdb.start(0) snippet into my plug-in I want to debug and try to trigger and get the following error:

Blank_Skitch_Document.png

Not quite sure how to proceed.

Comments (5)

  1. Pysis

    @Jim Zhan, what is the workaround? I have OSX 10.10.5 with Python from /usr/local/bin/python, version 2.7.10, with Sublime Text 3 build 3083. I installed Winpdb 1.4.8 from source using the "GNU/Linux" instructions, after having installed wxPython3.0-osx-cocoa-py2.7. I am able to run both the winpdb and rpdb2 utilities from the command line, and have the first open a GUI.

    In ST3 when I issue the command to "Plugin Debugger: run debug_example (opens Debugger)", or enter the command you provided that is also in the documentation, I see the same error you have, along with this in the console:

    " Traceback (most recent call last): File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 535, in run_ return self.run() File "debug_example in /Users/User/Library/Application Support/Sublime Text 3/Installed Packages/Plugin Debugger.sublime-package", line 15, in run File "plugin_debugger.tools in /Users/User/Library/Application Support/Sublime Text 3/Installed Packages/Plugin Debugger.sublime-package", line 404, in start File "plugin_debugger.tools in /Users/User/Library/Application Support/Sublime Text 3/Installed Packages/Plugin Debugger.sublime-package", line 136, in import_rpdb2 ImportError: No module named 'rpdb2' "

    I did not edit the settings file you did, as the Python I believe I should be using is accessible from my PATH variable, but I'm not completely sure about that.

  2. Jim Klo reporter

    @Pysis It's been some time since I did this, but looking at the notes, the workaround is to put the settings for the plugin into the global Packages/User/Preferences.sublime-settings file, which to me feels like the wrong place. If I remove the plugin - the settings it needs sticks around.

    Note that ST uses a bundled Python, which will show up first on PATH, not one that is on your external PATH variable, hence the default won't find it.

    It's also unclear if this package owner is maintaining this, as I opened a pull request with the fix several months ago, as according to ST2/3 development, plugins should not use the global settings file. But have seen no comment or response from the package owner. I see that in their release notes they made some sort of edit to use the global settings file instead which I think at the time I opened this, the documentation and the code didn't align. Likely they believe that having only one settings file for all their plugins is easier to maintain as an end user - which is probably true, however, that promotes a bunch of forgotten cruft in config files.

    TL;DR: use the Package Control version, and be sure to set the absolute path to the python 2.7 interpreter that knows where winpdb is within the Packages/User/Preferences.sublime-settings file:

    {
        "plugin_debugger_python": "/usr/local/bin/python"
    }
    
  3. Pysis

    @Jim Zhan Thank you for that explanation; it's just what I needed, and windbg does come up now. Now I just need to learn how to use the debugger for other plugins. It's also like you said, the tool doesn't seem to be stable or work well as it hasn't been maintained for a while by now.

  4. Log in to comment