How to use Vscode happy to write Python in Debug configuration steps _python

Source: Internet
Author: User
From my experience, it can be said that Vscode used to write Python is really suitable, you will experience a silky programming experience and the possibility of unlimited expansion. And, if your project is multi-lingual, such as web development, you don't have to open multiple editors and other tools, because all of this can be done in Vscode.

In the course of learning python, we have not found a third-party editor that compares the hand, with the most Python-brought editor. As I used to use the universe's first IDE (Visual Studio), when Visual Studio code appeared, the mood was a little excited. From my experience, it can be said that Vscode used to write Python is really suitable, you will experience a silky programming experience and the possibility of unlimited expansion. And, if your project is multi-lingual, such as web development, you don't have to open multiple editors and other tools, because all of this can be done in Vscode.

Vscode Download Address: http://www.jb51.net/softs/606746.html

Build the Environment

Search for extended python in Vscode, this is the shipment:

After installation, reload. I have already installed it, so the Disable, uninstall button is displayed.

You can happily play with Python below. Isn't it super convenient?

Basic operations

Start your first Python code in Vscode, and the Python plugin's pylint feature will automatically prompt you, auto-complete, and error-Prompt as you type.

We need to remind you Pythoner, Vscode includes vs, tab is 4 spaces by default.

Several commonly used shortcut keys, estimated that the vser can be painless conversion:

First is the F1/CTRL+SHIT+P universal key, who used to know ctrl+p: File switch Ctrl + SPACE: Auto prompt f12/ctrl+ left: jump to definition shift+f12: Preview definition ctrl+g: Jump switch number ctrl+/: Comment Toggle Alt + ↑↓: The whole line moves up or down ctrl+↑↓: the editor vertical scroll bar moves up and down, the cursor does not move Ctrl+backspace/delete: Whole word/continuous blank delete ctrl+→←: Cursor Whole word move ctrl+f find/ctrl+shift+f Find in file, It's all generic, so don't say anything like that.

Preview Definition diagram:

Debugging operations

F5 Debug runs anytime, anywhere. Note that the Vscode default after debugging, will stop in the first sentence, such as.

Debugging shortcuts are basically the same as vs.

F5: Debug/Continue, F10: Single Step Skip, F11: Step Into, shift+f11: jump out. F9: Toggle Breakpoint

The Left debug window shows the top-to-bottom debug mode, variables (local variables, monitoring), call stacks, breakpoints, and so on. Basically all the features we need are here.

A less-than-good design is a variable, monitoring these places is too small, to see some long variables than the VS convenience. But fortunately we have debug console ah, directly on the variable name on the good.

Here is a reminder that in the upper-left corner of the dropdown select Debug mode, the two commonly used are Python and integrated terminal/console, the first is in the plug-in environment to debug the run, the second is the integrated console. The problem is that the first type does not support input (), so if you want to debug the program with input, choose integrated terminal/console or external terminal/console is also possible.

Git support

Integration of GIT support, this is a great feature, not only the line at the beginning of different colors to add, delete, modify the row, click the beginning of the color block, but also to show the contrast. Files that are modified with different colors and markup hints are also available in the resource manager.

When you want to commit, just switch to the left source control, and commit is OK.

Summarize

Vscode small, fast, cross-platform, cool interface, various extensions, it is time to change with the new Vscode.

This is after all Microsoft produced, casually from the VisualStudio project group pull a few people can shake sublime, atom several street (not to mention vim), let me have a once use up can not stop feeling.

Next, plan to introduce several useful vscode extensions.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.