Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debug Pylons application through Eclipse

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?

like image 989
Max Stewart Avatar asked Sep 29 '08 05:09

Max Stewart


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 do I enable debugging in Eclipse?

A Java program can be debugged simply by right clicking on the Java editor class file from Package explorer. Select Debug As → Java Application or use the shortcut Alt + Shift + D, J instead.

How do I debug Python code in Eclipse?

Debugging. You can add breakpoints to your code by double clicking in the gray bar to the left of the editing pane within the Eclipse window (a blue dot will appear). Then, to pause the code at that location and inspect the value of variables, select Debug As >> Python Run or click the bug at the top of the screen.


1 Answers

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

like image 144
yanjost Avatar answered Nov 11 '22 12:11

yanjost