Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python: Cannot debug using vs code

I am new to python as well as anaconda, I installed and setup everything including environment variables. then i opened up vs code and typed in

print("hello world")

and tried debugging. I did not get any output and got a couple of timeout on debugger. this is what was on terminal after i ran the debugger:

(base) C:\Users\Arun>cd e:\pythontutorials && cmd /C "set "PYTHONIOENCODING=UTF-8" && set "PYTHONUNBUFFERED=1" && E:\Python\pythonw.exe c:\Users\Arun.vscode\extensions\ms-python.python-2018.11.0\pythonFiles\experimental\ptvsd_launcher.py --default --client --host localhost --port 62293 e:\pythontutorials\firstprogram.py "

like image 471
AruN Avatar asked Feb 18 '26 12:02

AruN


1 Answers

This probably is a path error. As I have encountered in the past VS Code doesn't allow you to run python commands from its terminal unless its paths are also set in the system variables. Do recheck these.

like image 136
Sumukha Pk Avatar answered Feb 21 '26 02:02

Sumukha Pk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!