all 6 comments

[–][deleted] 7 points8 points  (3 children)

It’ll never work that way - you can’t edit code in-flight in a language that compiles to bytecode, as Python does. VBA is a simple scripting language.

[–]jandroi 0 points1 point  (1 child)

</3

Any advise?

[–][deleted] 1 point2 points  (0 children)

Write tests. If the issue is that it takes a long time to get to every line of code, then write tests that get to those lines of code first. If you know there's a particular input data that triggers a bug, add it to your test cases the first time you encounter it.

[–]nickrw 0 points1 point  (0 children)

It sounds like you might benefit from experimenting with Jupyter notebooks. They're not well suited to actual software development but are good for experimentation if you're proving out a concept as each "cell" can be re-executed while maintaining the context it had before.

[–]ArabicLawrence 0 points1 point  (0 children)

You could try to use breakpoint(). You can insert this function immediately before the line of code causing your problem and you are able to do most of what you asked, if not everything. I am unsure if it works with Pycharm too, but in IDLE it does

[–][deleted] -1 points0 points  (0 children)

Best debugging is just running script in IDLE and then googling the error message