Debug Pyramid projects through eclipse (aptana studio)

aptana studio 3 pyramid framework debug

In my previous post i wrote pyramid framework settings in eclipse (aptana studio).

How can i debug pyramid projects through eclipse (aptana studio)?

When you give  “–reload” parameter in your project run configuration in arguments tab, eclipse will not debug your pyramid application.

development.ini –reload  => start without debugging

1 – delete “–reload” parameter in your project run configuration in arguments tab

development.ini  => start with debugging.

2 – set your debug points in your classes.

3 – click your debug configuration menu in eclipse toolbar -> debug button.

* debug icon credit

Pyramid framework settings in eclipse (aptana studio)

aptana studio 3 pyramid framework

How can i set up Pyramid Framework 1.3 in Eclipse or in Aptana Studio 3?

Sure, IDE is very important in software development(debugging, code assist, organize imports etc.). You can code python in editors, it is practical but diffucult for beginners.

Python and Django have eclipse plugin, there is no eclipse plugin for Pyramid Framework?

How i can run a Pyramid Project from Eclipse or Aptana Studio 3?

Steps :

1 – in Console : Create new pyramid 1.3.xx project :
On Linux:

   $ bin/pcreate -s alchemy MyProject

On Windows :

   > Scripts\pcreate -s alchemy MyProject

2 – Install your newly created project for development

   $ cd MyProject
   $ ../bin/python setup.py develop

On Windows :

   > cd MyProject
   > ..\Scripts\python.exe setup.py develop

3 – In Aptana Studio 3 : Create new PyDev project and give project content path as your Pyramid Project path

pydev

4 – For run configuration add a  pyramid_run variable in menu : Window > Preferences > in list PyDev – Interpreter – Python in tab String Substitution Variables – click Add variable and give key and value as in the screenshot below. On MS Windows select Scripts\pserve-script.py instead pserve.

pydev

5 – Add a run configuration in menu : Run -> Run Configuration on the left side on Python Run node Right Click : New Click and give run configuration settings and run.

pydev

pydev

6 – Your pyramid application runs on browser.

pydev