Here's how you do it.
create launch_tg.py, in the same directory as development.ini, contains:
#################################
from paste.script.serve import ServeCommand
ServeCommand("serve").run(["development.ini"])
#################################
Start Eclipse.
File -> New -> Project -> Pydev -> Pydev Project
Project name: test
Click: "Please configure an interpreter in the related preferences before proceeding."
New -> Browse -> /your_virtualenv_dir/your_webapp_dir/bin/python -> Ok -> Ok
Ok -> Finish
Pydev Package Explorer -> right-click on 'test' -> Refresh
Run -> Debug Configurations -> Python Run (double click)
Main tab -> Project -> test
Main tab -> Main module -> ${workspace_loc:your_eclipse_project/src/your_webapp_dir/launch_tg.py}
Arguments tab -> Working directory -> ${workspace_loc:test/src/Test}
Click debug
Taken from: http://ping.fm/DnR7T
Hi Murzal,
ReplyDeleteI have set up PyDev to work with tg2, but I can't get code completion to work in some cases. For example, in my setup, the request object has no code-completion, which is a real pity, as it's being used so much. You have code completion working for request objects? If so, any hints on how to get it working.
thanks
-Dave.
@Dave: Well, I faced similar issue. I had to manually add all TG2.1 packages in PyDev - PYTHONPATH. Terrible. If you found a simpler way to do it, please let me know.
ReplyDeleteI was finally able to get the debugger working, thanks!
ReplyDeleteYou're welcome.
Delete