Thank you very much, I forgot about that solution, it is simple and effective!
By the way: In case you @albanD haven’t seen it yet, you can shorten that to breakpoint() which is a built-in since python 3.7 6 - saves a little bit of typing:)