6

I've just started using pydev in Eclipse and I have a lot of questions about the way the interactive console works.

I have found out how to launch an interactive console and use it to run functions. My questions are this:

  1. Every time I change my code and re-run it, my interactive console disappears. This is annoying as I have to reopen a console and I can't see/rerun my previous history. If I pin it, it stays, but then I can't run any code. Is there any way to keep the interactive console open all the time, but also be able to run your code? I currently spend a significant amount of my day closing and opening consoles!

  2. How can I run a function from the interactive console, but still get the debugger to stop at breakpoints. I can use the debugger if I am running the code from a main function, but if I run the code from the console, it just skips right over break points.

thanks Niall

il_guru
  • 8,383
  • 2
  • 42
  • 51
nrob
  • 861
  • 1
  • 8
  • 22

2 Answers2

0
  1. Instead of clicking in "Python Run", you may press Ctrl+Alt+Enter with the desired Python file active, and the console will call execfile on it. All your previous story stays there. You can also select some part of your code and run only it.

  2. As far as I know, you can't. Check the pdb module instead.

erickrf
  • 2,069
  • 5
  • 21
  • 44
0

Not sure if the source of the problem is the same, but I encountered a similar issue in which the PyDev console kept disappearing as soon as I clicked in the script editor, even if the console's Pin Console button was clicked.

I solved this simply by double-clicking on the script's tab, which allowed the console to stay visible at all times.

sc28
  • 1,163
  • 4
  • 26
  • 48