0

I use PyCharm and I would like to jump from one break point to another one when debugging. Here is a screenshot of my editor:

enter image description here

I had a look at the answers how to jump between BreakPoint in JetBrains PyCharm IDE and Run to next breakpoint in Intellij mac and in both threads it is mentioned that you should use F9 or just resume the programm. I tested all actions like "Step Over", "Step Into", "Resume programm" etc. but in all cases the for loop is just executed successively, meaning that the count variable i is always incremented by one.

Do you have any idea how to jump to the next breakpoint without having to execute the whole loop?

PeterBe
  • 700
  • 1
  • 17
  • 37
  • 1
    You have a breakpoint on the loop / listcomp. So the next step is always the next index. So you are basically stepping out, but looping back to same break point. If you dont want to execute the loop, why there is a break point first of all ? If you want to debug till a point in the loop, do it and remove the break point and press F9. – Kris May 09 '22 at 11:19
  • @Kris: Thanks Kris for your answer. Yes, removing the break point after a certain number of loop iterations is a valid option. Thanks for your help (if you write this as an answer, I will upvote and accept it. But of course you don't have to). – PeterBe May 09 '22 at 12:09
  • 1
    To have a breakpoint stop in a single line expression you have to use conditional breakpoint, see [this thread](https://stackoverflow.com/q/66954715/10794031) for an example. – bad_coder May 09 '22 at 13:26

0 Answers0