Debugging pylons in Eclipse on Ubuntu
I am trying to get debug pylons in Eclipse under Ubuntu. In particular. I'm not sure what to use for the "Main Module" in the Run Configuration dialog.
( this is a similar question on stackoverflow, but I think it refers to windows as I cannot find paster-script.py on my system)
Can anyone please help?
source to share
I managed to fix it now.
In Window>Preferences>Pydev>Interpreter-Python
uninstall python interpreter and reload it (select New
) after installing the pylons.
In the terminal, cd to the projects directory. Then enter sudo python setup.py develop
Not sure what this does, but it does the trick (if anyone wants to fill me in please)
In Run>Open Debug Dialog
enter the location of the paster in Main Module
. For me it is /usr/bin/paster
. Then on the tab Arguments
in Program arguments
enterserve /locationOfYourProject/development.ini
All is ready. It took me a lot of effort to figure out that this doesn't work if the arguments include--reload
source to share
Haven't tried Eclipse, but I'm pretty sure the solution I used to debug Pylons apps in WingIDE will work here too.
-
Write the following two-line file (call it run_me.py or similar) and save it in your project directory:
from paste.script.serve import ServeCommand
ServeCommand ("to serve"). Launch (["development.ini"])
-
Set this file as your main debug target (aka main module)
-
Enjoy.