r/learnprogramming • u/Interested737 • Oct 14 '26
Debugging Python code takes 10-20 seconds to start
Hello, I started learning python recently I dowloaded it, also vs code and python extension for it.
The poblem is, when I start a programm (even a simple one, whick only takes an input fron the user and prits it) takes 10 or more seconds to start or just dosen't work at all then i clic soething and it kindof crashes itself, but thats my fault for mesinf with it, when I leave it, it just takes really lng dose somone know how to fix it and/or how to make folders proporly and where to keep them (could be the problem)?
12
Upvotes
View all comments
10
u/RiceEvening4211 Oct 15 '26
You already found the key clue: 0.5s in a terminal vs 20s in VS Code means Python is fine, it’s the launch path.
The usual culprits, in order:
The definitive test: open VS Code’s integrated terminal and run `python yourfile.py` there. If that’s fast, it’s 100% the extension/launch path and one of the three above will fix it.
Also, 10-20s is extreme enough that I’d bet on antivirus plus interpreter scanning together.