Search code examples
pythonvisual-studio-code

Multiple times execution when pressing F5 once in VSCode with Python


I'm just starting with Python in VSCode.
Pressing F5 (or CTRL+F5) for debugging (running), the py code seems to be executed multiple times in the terminal, before it stops (with or without breakpoint the same).

Why does this happen and how to avoid it?

Screenshot after pressing F5


Solution

  • OK, restarting VScode solved the problem. Quite strange, but I have often had such experiences with VScode....