Home  >  Article  >  Backend Development  >  How to use VS Code python?

How to use VS Code python?

PHP中文网
PHP中文网Original
2017-06-21 15:26:392321browse

I have always used Notepad++ to write Python code. Then I remembered that when I was looking for information, there was a VS Code that could write some script languages ​​​​(js, node.js) or even high-level programming languages ​​​​(C#, PHP, JAVA , Python, etc.) and it is written by Microsoft itself, which aroused my strong interest. I checked VS Code and found that this thing is good and widely loved by programmers. It can not only run the written program on Windows, but also It can also run on Mac and Linux platforms, and is open source (this illustrates Microsoft's huge changes from the side. Its open source strength is unprecedented. I am looking forward to Microsoft's open source framework asp.net core. When it is perfected, I will study it carefully and hope that there will be enough market in China, but I don’t know if China’s national conditions will allow .net core to shine). Finally I thought that was it!
Microsoft VS Code official website The new version is 1.12. This version is somewhat different from the previous version. The original tasks.json has been changed to setting.json. Moreover, the user settings and workspace settings have been merged.
After checking the information, I can only say that there are a lot of them. I picked two of them. You can take a look:



Follow the above The configuration and installation of the two links can be configured completely. I will not talk nonsense and talk about some of my own experiences:
python.pythonPath needs to be configured with the path of the Python package you downloaded....
I don’t know if you noticed it, but there are always green and red wavy lines:


But the code is not wrong, and it can still run normally without reporting an error! This is a trap! ! I fiddled with VS code on both sides over and over again, and reinstalling it didn’t work. Then I thought it might be a Linting (language analysis) problem, and then I followed the prompts to reconfigure the layout of the code:
Therefore, the error here It's not a code problem, but a problem with language analysis plug-ins like Pylint. Just change the formatting. So in order to avoid such good syntax analysis errors, we set it to ignore it (it's a bit late today, I will study it tomorrow... ). There is still a problem to be solved here:

This is very embarrassing, the debugging module actually has two python. Still to be solved....

The above is the detailed content of How to use VS Code python?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn