If your Python script in VS Code shows no output at all (not even print statements), it's likely a VS Code configuration issue rather than a problem in your code. First, confirm you're running the correct script by adding print("Script started")
at the top. Try running the script manually in the terminal (python DBCon.py
) to see if output appears—if it does, the issue is with VS Code's execution settings. Also, ensure the correct Python interpreter is selected (Ctrl+Shift+P
→ "Python: Select Interpreter") and that mysql-connector-python
is installed. Avoid running in the interactive window by disabling related settings, and make sure to look at the TERMINAL, not the OUTPUT panel, for results.