Python Forum
Setting up python with visual studio code. Having one issue.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting up python with visual studio code. Having one issue.
#1
On the newest version of python and I'm running it through visual studio code.

Anyways I set the python path in user settings and then wrote print ("hello") went to debug tab and pressed the green play button. But my code doesn't get highlighted and nothing pops up on my screen.

Here is a screenshot of my current window: [Image: iFoR0.png]

my user settings:[Image: oHyxm.png]

I was watching this video and trying to set it up but mine doesn't give me any options like the video. [Image: QkoQZ.png]

So when I press the green debug option, it just takes me to the terminal and shows the output but not to the debug console. Like so: [Image: vYCJGhN.png]
Reply
#2
You have to save the code to a file first (either 'Ctrl S' or File > Save).

To run the program, you may have to select the 'Debug Icon' first, then the green arrow. It takes a while to set up. After that icons show up next to the file name that allow you to stop, rerun, or single step.

To set a 'BreakPoint', 'Left Click' to the left of a line number on an 'excecutable line'. You can 'Left Click' on the 'Bottom Right Window' to switch between 'Debug Console' and 'Terminal' mode.

I hope this helps you get started.

Lewis
To paraphrase: 'Throw out your dead' code. https://www.youtube.com/watch?v=grbSQ6O6kbs Forward to 1:00
Reply
#3
Install Python extension and Code Runner extension.
Look down in left corner(can click),your Python interpreter is setup okay.
Now you have button up in right corner to run code.
Disable Pylint(only turn if need to check code) is can be noisy if you don't know how it work.
Install Git.

You can look a my quick review from last year.
VS Code is my main editor,and it's as good as it gets. Wink
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Visual Studio Code help aaronrousch 4 3,788 Jan-25-2025, 05:55 AM
Last Post: ndc85430
  I cannot create a virtual environment on visual studio code using python Willem_Aucamp316 2 3,160 Nov-27-2024, 02:20 PM
Last Post: menator01
  Trouble Setting Up Selenium with FireFox (Python 3 on Windows 10)) gw1500se 5 5,909 Oct-07-2024, 06:41 PM
Last Post: AlluminumFoil
  Code Completion in Visual Studio for External Libraries mjakov 0 580 Aug-25-2024, 02:48 PM
Last Post: mjakov
  Python Coding in Power BI Visual vjrans 0 792 Jan-31-2024, 07:54 AM
Last Post: vjrans
  My code works on Jupyter Lab/Notebook, but NOT on Visual Code Editor jst 4 4,179 Nov-15-2023, 06:56 PM
Last Post: jst
  How to set PYTHONPATH in Visual Studio Code? aupres 5 12,501 Aug-15-2023, 03:51 PM
Last Post: snippsat
  how do I open two instances of visual studio code with the same folder? SuchUmami 3 4,035 Jun-26-2023, 09:40 AM
Last Post: snippsat
  Updating Code And Having Issue With Keys Xileron 8 3,111 May-25-2023, 11:14 PM
Last Post: DigiGod
  Visual Studio Code NewPi 3 2,075 May-16-2023, 11:13 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020