1、 ctrl + shift + p,打开命令面板,输入install,在菜单中选择Package Control:Install Package如图,回车
2、 步骤1后,在命令输入框中输入: SublimeREPL,弹出菜单中选择【SublimeREPL】
3、 点击菜单啦【Tools】->【SublimeREPL】->【python】,查看安装的插件,如图所示
4、 步骤4后,运行结果如图所示,进入到交互式命令中去
5、 设置快捷键:点击菜单栏【Preferences】->【Key Bindings】
6、 输入代码如下并保存:{"keys": ["f5"],"caption": "SublimeREPL: Python - RUN current file","command": "run_existing_window_command","args": {"id": "repl_python_run","file": "config/Python/Main.sublime-menu"}}
7、 按下快捷键F5,运行结果如图所示。
8、 在路径C:\Users\admin\AppData\Roaming\Sublime Text 3\Packages\SublimeREPL\config\Python下,找到Main.sublime-menu文件
9、 搜索【repl_python】如图所示,并修改 保存【cmd】行为"cmd": ["python", "-i", "-u","$file_basename"]
10、 点击菜单栏【Preferences】->【Key Bindings】如图所示
11、 添加代码如下并保存,F5键就可以调试了{"keys": ["f8"],"caption": "SublimeREPL: Python - PDB current file","command": "run_existing_window_command","args": {"id": "repl_python_pdb","file": "config/Python/Main.sublime-menu"}},
12、如果您觉得有用,记得在下方点击投票、点赞、关注、留言,小编会定期奉上更多的惊喜哦,您的支持才是小编继续努力的动力,么么哒。