擅长:python、mysql、java
<p>您可以在jupyter中使用<code>ipdb</code>与:</p>
<pre><code>from IPython.core.debugger import Tracer; Tracer()()
</code></pre>
<hr/>
<p><strong>编辑</strong>:自IPython 5.1以来,上述函数已被弃用。这是一种新方法:</p>
<pre><code>from IPython.core.debugger import set_trace
</code></pre>
<p>在需要断点的地方添加<code>set_trace()</code>。当输入字段出现时,为<code>ipdb</code>命令键入<code>help</code>。</p>