Eclipse/PyDev question

K

king kikapu

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 ?

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 ??


Thanks a lot for any help
 
G

gatti

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
 
K

king kikapu

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.


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

Hey Lorenzo,

thanks for the help!

I understood that with the Debug perspective. Ok, i will, as
currently, have to swtick manually to PyDev.

But i cannot figgre out how i can tell Eclipse to run the whole
Project and not the currently active script that i work on...
 
K

king kikapu

Ah, i forgot another one:

as any project evolves, you need to organize it in directories. So, i
have a project named "Dev" and Eclipse has provided me (in Navigator)
with "Dev" and "Src". Inside Src i put my .py files. Let's say that i
want to create a directory there (will i make it in "Src" or in "Dev")
to put other .py files. I tried adding a "Folder", i also tried to add
a "Pydev Source Folder", either way i cannot refer to these files from
a .py located in Src directory with the usual "from folderA
import"...It does not understand the folder structure and i am pretty
sure i am missing something obvious here...
 
K

king kikapu

Fabio,

thanks for the reply!

Anyway, i saw that i cannot import anything if i use "Source Folders"
in Eclipse/PyDev. The only way i can accomplish that is by using
"PyDev Packages". Thus, i can import whatever i want ant intellisense
is working great! I just cannot understand the usefulness of "PyDev
Source Folders"...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

PyDev 3.0 Released 2
PyDev 3.3.3 Released 0
PyDev 3.4.1 Released 0
PyDev 3.1.0 released 0
PyDev 3.5.0 Released 0
PyDev 2.8.2 released 0
PyDev 2.8.0 Released 0
Eclipse/PyDev - BOM Lexical Error 20

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top