Version 16 (modified by 14 years ago) ( diff ) | ,
---|
Table of Contents
Eclipse
Eclipse is a full IDE supporting Debugging & Code Completion.
PyDev is an Eclipse module which supports Python.
Installation
- Install Java JDK
- Install Eclipse 3.6
- Install PyDev through Eclipse:
- Help menu > Install New Software
- Work with: http://pydev.org/updates
- Add, OK
- tick PyDev (can exclude the optional PyDev Mylyn Integration), Next, Next, Accept, Finish
- tick to trust certificate, Restart now
- Set up the Python Interpreter:
- Window > Preferences > PyDev > Interpreter - Python
- New, Browse to python26/python.exe, OK, OK
- Add a new PyDev Project:
- File > New > Project > PyDev Project > Next
- untick Use Default
- Browse to the web2py directory
- Give the project a name: eden, Next
- untick "Create default 'src' folder and add it to the pythonpath"
- Debug Configuration: Run > Debug Configurations > Python Run
- Name: Sahana Eden
- Project: Browse to eden
- Main Module: Browse to web2py.py
- Arguments tab: Program Arguments: -a password
- Apply, Debug
- unblock in Windows Firewall
Other Installation Guides (should not be required):
- http://kollerie.wordpress.com/2009/04/07/setting-up-your-ide-for-web2py-development/
- (Simpler Instructions) http://allisterx.blogspot.com/2009/06/using-web2py-framework-on-eclipse.html
Bzr integration (optional)
- http://wiki.bazaar.canonical.com/BzrEclipse
bzr branch lp:bzr-xmloutput cd bzr-xmloutput python setup.py install cd ..
Configuration
- Right-click on Java perspective in top-right & select Close
- Window menu > Open Perspective > Other > Debug
- Window menu > Show View > Expressions
- right-click on toolbar > Customise Perspective > untick PyDev Debug, Run & External Tools
Debugging with Eclipse
- Set and remove breakpoints by double clicking in the margin of the code file
- Click the 'Debug Sahana Eden' button
- F5 Step into functions
- F6 Step over lines
- F7 Step out of functions
- Use expressions (drag and drop from code) or right-click > watch
Related Links
Note:
See TracWiki
for help on using the wiki.