Home  >  Article  >  Development Tools  >  How to debug python files in Sublime Text3

How to debug python files in Sublime Text3

藏色散人
藏色散人forward
2021-06-23 16:39:555446browse

How does Sublime Text3 execute debugging python files? The following sublime tutorial column will introduce you to the specific steps of Sublime Text3 to execute and debug python files.

##1. Open [Preferences]->[Browse Plug-ins] and you will enter the folder

How to debug python files in Sublime Text3

2. After entering the folder, open the "python" folder, create a new one if it does not exist, and then enter the folder

How to debug python files in Sublime Text3

3. Enter the file Create a new file named "Python.sublime-commands" after the folder

How to debug python files in Sublime Text3 The content is as follows (can be copied) The corresponding value of path is changed to the installation directory of python on your computer

{

"cmd":["python.exe", "-u", "$file"],

"path":"D:\python37",

"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",

"selector": "source.python",

"encoding":"cp936"

}

How to debug python files in Sublime Text3

5. After saving the file, enter Sublime Text and select [Tools]->[Compilation System]->[python (or automatic compilation)]

How to debug python files in Sublime Text3

6. Then click [Tools]->[Compile Now] (or press Ctrl B directly) to view the effect

How to debug python files in Sublime Text3 Effect Picture

How to debug python files in Sublime Text3

The above is the detailed content of How to debug python files in Sublime Text3. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete