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
  Python Coding in Power BI Visual vjrans 0 275 Jan-31-2024, 07:54 AM
Last Post: vjrans
  My code works on Jupyter Lab/Notebook, but NOT on Visual Code Editor jst 4 1,009 Nov-15-2023, 06:56 PM
Last Post: jst
  How to set PYTHONPATH in Visual Studio Code? aupres 5 4,188 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 886 Jun-26-2023, 09:40 AM
Last Post: snippsat
  Updating Code And Having Issue With Keys Xileron 8 1,158 May-25-2023, 11:14 PM
Last Post: DigiGod
  Visual Studio Code NewPi 3 1,048 May-16-2023, 11:13 PM
Last Post: snippsat
  A question about setting up Python JanOlvegg 1 571 Feb-20-2023, 10:21 PM
Last Post: deanhystad
  Visual Studio Code venv ibm_db error mesi1000 7 2,792 Nov-13-2022, 12:36 AM
Last Post: snippsat
  debugging help on Visual Studio Code mg24 12 2,003 Oct-02-2022, 12:18 AM
Last Post: mg24
  Setting up new Python kernel for JupyterLab Desktop on M1 Mac daler6 0 1,263 Jun-20-2022, 03:45 AM
Last Post: daler6

Forum Jump:

User Panel Messages

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