I've been having this same issue recently and it's driving me mad.
macOS Sequoia Version 15.1 python 3.9.6 64bit vscode insiders 1.96.0-insider (Universal)
Extensions: Python (microsoft) - rolled back to 2024.14.0 Pylance Python debugger github copilot github copilot chat
Read countless threads trying to find others with the same issue, trying all recommended solutions but no luck.
Your issue sounds identical to mine, running any more than a few selected lines of code at a time results in the output to terminal freezing up while executing the code, only running a few lines before getting stuck/frozen halfway through running a random line (depending on where I start the selection from).
It seems as though the code WILL run if I go line by line but in a file with 100+ lines this is not ideal.
This functionality was working fine before and something has broken it but I cannot for the life of me figure out what.
The only other major change to my computer recently was upgrading the OS to Sequoia, so i will likely try that next but was avoiding having to revert OS.