Changes between Version 22 and Version 23 of ChimeraEclipse


Ignore:
Timestamp:
Sep 8, 2010, 11:37:26 AM (16 years ago)
Author:
Darren Weber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ChimeraEclipse

    v22 v23  
    2323Create a new workspace (e.g., Eclipse - File > Switch Workspace > Other) for the new Chimera workspace settings.  Then use Window > Preferences to locate the !PyDev panels to setup the "Interpreter - Python" to use the Chimera [http://plato.cgl.ucsf.edu/trac/chimera/attachment/wiki/ChimeraEclipse/Chimera-Eclispe-PyDev-Preferences.png python2.7 interpreter] (be sure to manually add {{{$CHIMERA/share}}} and {{{$CHIMERA/lib}}} to the "system PYTHONPATH" configuration).  Then set some [http://plato.cgl.ucsf.edu/trac/chimera/attachment/wiki/ChimeraEclipse/Chimera-Eclispe-PyDev-Preferences-Env.png Chimera environment variables] (the $PATH and $CHIMERA syntax did not work, so these environment settings use full paths; the paths must point to hard-links in the file system, Chimera doesn't work with symbolic-links). Finally, an optional addition is to create a VirtualEnv for Chimera and add the pylint package, then configure the [http://plato.cgl.ucsf.edu/trac/chimera/attachment/wiki/ChimeraEclipse/Chimera-Eclispe-PyDev-Preferences-PyLint.png pylint preferences].  It should be configured now to enable importing Chimera modules and [http://plato.cgl.ucsf.edu/trac/chimera/attachment/wiki/ChimeraEclipse/Chimera-Eclispe-PyDev-Run.png running Chimera].
    2424
    25 [[Image(Chimera-Eclispe-PyDev-Preferences.png, 10%)]]
     25Click on these thumbnails for the larger views:
     26 * python2.7 configuration [[Image(Chimera-Eclispe-PyDev-Preferences.png, 10%)]]
     27 * environment configuration [[Image(Chimera-Eclispe-PyDev-Preferences-Env.png, 10%)]]
     28 * pylint configuration [[Image(Chimera-Eclispe-PyDev-Preferences-PyLint.png, 10%)]]
     29 * run configuration [[Image(Chimera-Eclispe-PyDev-Run.png, 10%)]]
    2630
    27 [[Image(Chimera-Eclispe-PyDev-Preferences-Env.png, 75%)]]
     31=== Runtime debugging ===
    2832
    29 [[Image(Chimera-Eclispe-PyDev-Preferences-PyLint.png, 75%)]]
     33The !PyDev plugin for eclipse has facilities for [http://pydev.org/manual_adv_remote_debugger.html remote debugging] of an active process.  To use this facility, startup Chimera as usual and launch the IDLE shell.  Startup eclipse and activate the !PyDev debug perspective.  Activate the !PyDev [[http://pydev.org/manual_adv_remote_debugger.html remote debugging server].  Using a terminal or file browser, locate the {{{pydevd.py}}} file in your eclipse installation (somewhere in the eclipse plugins; e.g. in a linux terminal try: {{{locate pydevd.py}}}).  Then, within IDLE, enter the following to enable remote debugging within the eclipse debug perspective:
     34{{{
     35#pydevd_path="<eclipse plugins path to file: pydevd.py>"
     36import sys
     37sys.path.append(pydevd_path)
     38import pydevd
     39pydevd.settrace()
     40}}}
     41In the eclipse console, try {{{print "Hello there!"}}} and see if it appears in the IDLE shell.  If it does, your hooked into Chimera from eclipse and you have access to all the object inspection features of the !PyDev debugger.
    3042
    31 [[Image(Chimera-Eclispe-PyDev-Run.png, 75%)]]