views:

1740

answers:

4

I have Eclipse setup with PyDev and love being able to debug my scripts/apps. I've just started playing around with Pylons and was wondering if there is a way to start up the paster server through Eclipse so I can debug my webapp?

+4  A: 

Create a new launch configuration (Python Run)

Main tab

Use paster-script.py as main module (you can find it in the Scripts sub-directory in your python installation directory)

Don't forget to add the root folder of your application in the PYTHONPATH zone

Arguments Set the base directory to the root folder also.

As Program Arguments use "serve development.ini" (or whatever you use to debug your app")

Common Tab

Check allocate console and launch in background

yanjost
+1  A: 

yanjost has it right, just wanted to add that you need to make sure you do not use the --reload option, this will prevent the debugger from properly attaching itself and cause your breakpoints not to work. Just a little thing I ran in to.

Wayne
+1  A: 

On linux that will probably be /usr/bin/paster or /usr/local/bin/paster for paste script, and for arguments i have: serve ${workspace_loc}${project_path}/development.ini

Damian
A: 

I was able to get --reload working by changing the 'Working directory' in the arguments tab to not use default (i.e. select 'Other'->File System->'Root of your Pylons' app where development.ini is stored.

David M