Eclipse/PyDev question

gatti at dsdata.it gatti at dsdata.it
Mon Aug 13 07:44:45 EDT 2007


On Aug 13, 11:48 am, king kikapu <aboudou... at panafonet.gr> wrote:
> Hi,
>
> i am using Eclipse (Platform Runtime binary) with PyDev and i was
> wondering if someone can help me with this:
>
> 1. I set breakpoints to a .py file and i have told Eclipse to open the
> Debug perspective when it sees that some .py file(s) of my project
> indeed contains breakpoints. So, i press F9,  Eclipse starts, Debug
> perspective opens and i can use the debugger just fine. But when the
> app terminates, how can i tell Eclipse to switch automatically to the
> PyDev perspective and not remain in the Debug one ?

You don't, Eclipse keeps the same perspective because for what it
knows you might want to debug some more and it correctly avoids to
decide what is good for you. Switching to the debug perspective when
you issue a debug command is an exception to the normal switching of
perspectives with the respective big buttons and the menu.
If you wish to switch perspective to edit code before debugging again,
putting editors and appropriate accessory views in the debug
perspective might be good enough.

> 2. Let's say we have a project that consists of some .py files. I want
> to press F9 when the editor displays anyone of these files but make
> Eclipse to run the whole project (that has another .py as "default")
> and not the script that i am currently working on, is that possible ??

Executing the current file is a bad habit, Eclipse remembers a list of
execution/debug configurations that can be selected from a dropdown
list in the toolbar and edited with a dialog box; after you setup
entry points for a project you can use and edit them as needed.
I'm using Eclipse for Java and my entry points include remote
debugging of a GUI application, about 6 JUnit tests, about 3 command
line tools with many complex parameter sets each, and some Ant builds;
it would take about one hour of trial and error to reconstruct the
command lines, classpaths and JVM options. I only run the current file
as a draft for an edited configuration.

Regards,
Lorenzo Gatti




More information about the Python-list mailing list