14

I am trying to write a project in PyCharm after a friend recomended me to try it instead of Eclipse. take this code as example:

for x in xrange(1000)
    #do things

#want to get here fast in debug with out iterating the loop step by step

I want to put BP in the loop and after it, and by pressing a button to jump to the second one

well, I know it's a stupid question but I honestly searched for an answer and could not find it..

thanks,

asafel
  • 713
  • 1
  • 7
  • 14

2 Answers2

33

When you run in "debug" mode and stop on a breakpoint, simply click the "play" button (marked in the picture below) and it'll continue running until the next breakpoint.

enter image description here

Nir Alfasi
  • 53,191
  • 11
  • 86
  • 129
  • Thanks for your kind answer, but i must say i already tried what you said.. it kips iterating through the loop... any other suggestions? – asafel Jul 22 '14 at 05:49
  • @asafel if you have a BP inside the loop it'll stop there every time! if you don't want to continue stopping there - remove that BP. – Nir Alfasi Jul 22 '14 at 05:52
  • edit - i just moved the BP one line above from the loop and it's work.. so thanks a lot – asafel Jul 22 '14 at 06:19
  • 3
    @asafel you can also "mute" a BP (4 buttons below the previous one) so it'll be temporarily ignored. – Nir Alfasi Jul 22 '14 at 06:21
  • Is there a way to set breakpoints (add them) after having started a script? E.g. in case a script runs too long, insert a breakpoint to see what it is actually doing when I know in which for-loop it runs right now? Thanks – tim May 12 '17 at 12:43
  • 1
    @tim yes, but only if you ran the script in "debug" mode, if you ran it using the "play" button (instead of using the "bug" button) then you won't be able to break. – Nir Alfasi Jun 21 '17 at 20:52
  • Pressing F9 will stop at next breakpoint. Clicking on Play button will skip all breakpoint and run till end. – Vivek Dani Feb 07 '22 at 02:00
6

For Pycharm 5.0, it's on the left, as marked in the picture below.

Pycharm 5.0

Searene
  • 25,920
  • 39
  • 129
  • 186