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?

+1


source to share


4 answers


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

+4


source


I got it in basically much the same way, although you don't have to do the setup.py development step - it works fine without it.



What it does is that it sets a global reference to your project directory for a python package named after your project.

+1


source


I need this "sudo python setup.py develop" step in order to run it. Otherwise it throws some exceptions.

btw, setup.py is the one created in your created project.

+1


source


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.

0


source







All Articles