在Sublime Text 3中运行Python调试器(pdb) [英] Run Python Debugger (pdb) in Sublime Text 3

查看:173
本文介绍了在Sublime Text 3中运行Python调试器(pdb)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Sublime Text 3中设置python调试器( pdb )断点?

How can you set python debugger (pdb) breakpoints in Sublime Text 3?

SublimeREPL

Both SublimeREPL or Python Breakpoints fail with default python build system:

print "hello"
# code runs fine without this breakpoint
import pdb; pdb.set_trace()
print "bye"

>>>File "C:\Python27\lib\bdb.py", line 49, in trace_dispatch
>>>return self.dispatch_line(frame)
    >>>File "C:\Python27\lib\bdb.py", line 68, in dispatch_line
    >>>if self.quitting: raise BdbQuit

出现上述问题已记录,但没有明显的修复方法.还是答案一直盯着我?

Above issue appears documented, but with no obvious fix. Or has the answer been staring at me?

推荐答案

python断点插件,并检查此链接python断点调试器

python breakpoint plugin and check this link python breakpoint debugger

使用ctrl + shift + b在一行中切换断点

但这不是使用文本编辑器调试软件的最佳解决方案.有最好的IDE,可以使您的开发更加轻松

But its not preferable solution for debugging a software using a text editor. There are best IDE which makes your development lot easier

  • Visual Studio社区版

  • visual studio community edition

Pycharm

Eclipse

科莫多

这篇关于在Sublime Text 3中运行Python调试器(pdb)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆