Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse PyDev: setting breakpoints in site-packages source

I am debugging a problem in Django with Pydev.
I can set breakpoint in my django project code with out a problem.
However I can't set breakpoints in the Django library source code (in site-packages).

The PyDev debugger user interface in this case simply does nothing when I click to set the breakpoint and does not break at that location when I run the debugger.

Am I missing some PyDev configuration? In other debuggers I have used, this behavior indicates a problem relating the debug information with the source code. Any ideas on next steps would be a help.

I also have the site-packages configured in PyDev to be in my PYTHONPATH

I am using Eclipse on Max OS X if that helps.

Thanks

like image 933
Ted Avatar asked Feb 17 '09 22:02

Ted


People also ask

How do I use PyDev debugger?

Use Ctrl+F10 to open the context-menu and then select Add Breakpoint; Right-click the left bar to open the context-menu and then select Add Breakpoint; Use Ctrl+Shift+B to toggle the breakpoint in the line (if it doesn't work, go to the customize perspective and enable Breakpoints in Action Set Availability.

How to turn off PyDev in eclipse?

pydev* from eclipse/plugins and eclipse/features or you can go to help > software updates > manage configuration, choose the PyDev plugin and disable it (after that, to completely remove it, you must restart Eclipse and only then select it for uninstall). Note that this process is the same for any Eclipse plugin.

How do I run code in PyDev?

Go to the menu: Alt + R + S + The number of the Run you wish (It can be Python, Jython, unit-test, etc). Note: if you were using unit-tests, you could use: Ctrl+F9 to run the unit-tests from the module (and even selecting which tests should be run -- and if Shift is pressed it's launched in debug mode).


2 Answers

Have you imported the Django source as a project? To do that you just create a new PyDev project and set it's location to the Django source folder.

like image 190
webjunkie Avatar answered Oct 21 '22 07:10

webjunkie


Hey, this is timely! Eric Moritz just announced the release of an interesting new way to debug views using pdb called django-viewtools.

like image 43
Van Gale Avatar answered Oct 21 '22 09:10

Van Gale