Python Forum
Setting up python with visual studio code. Having one issue. - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Setting up python with visual studio code. Having one issue. (/thread-10438.html)



Setting up python with visual studio code. Having one issue. - xringo - May-20-2018

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]


RE: Setting up python with visual studio code. Having one issue. - ljmetzger - May-20-2018

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


RE: Setting up python with visual studio code. Having one issue. - snippsat - May-21-2018

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