Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

`breakpoint()` not working

未关闭
#897 10 条评论 16 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
jupyter, jupyter-notebook, python
领域
backend, devtools

调研方向

首先,在所描述的最小 conda 环境中复现该问题,并在 notebook 单元格中比较 breakpoint() 与 import pdb; pdb.set_trace()。然后跟踪 ipykernel 如何处理这些调试器入口点。当 breakpoint() 在报告中的 JupyterLab 环境中调用 pdb,并且现有行为有针对回归的覆盖时,即可视为完成。

由索引模型根据 Issue 内容生成。

描述

Using a fresh install of Jupyter Lab my usual breakpoint() to invoke the debugger in a Notebook is skipped (see screenshot). Using import pdb; pdb.set_trace() instead invokes pdb as expected.

I was expecting (am I wrong?) that a call to breakpoint() in a cell would invoke pdb.

This is using a fresh conda install of Jupyter Lab this morning, no reconfiguration of the environment has occurred.

Description

image

Reproduce

I've created a fresh minimal environment:

$ conda create -n tmp_env python=3.8 jupyterlab

$ jupyter --version
jupyter core     : 4.7.1
jupyter-notebook : 6.4.3
qtconsole        : not installed
ipython          : 7.27.0
ipykernel        : 6.3.1
jupyter client   : 7.0.2
jupyter lab      : 3.1.10
nbconvert        : 6.1.0
ipywidgets       : not installed
nbformat         : 5.1.3
traitlets        : 5.1.0

and then I run jupyter lab and try to call breakpoint() as noted in the screenshot above.

I used jupyter lab --debug and scanned the output, nothing looked amiss (but there's a lot and I'm not sure what to look for) - I can attach a copy if needed?

I noticed this originally in a second more complex environment (also built today, making me think this is a library update issue somewhere) and I made the above simple environment to try to narrow things down, but the issue remains.

Environment

Linux Cinnamon using Anaconda with Firefox, the OS is all up to date.

$ inxi -b
System:    Host: ian-XPS-15-9550 Kernel: 5.4.0-77-generic x86_64 bits: 64 Desktop: Cinnamon 4.8.6 
           Distro: Linux Mint 20.1 Ulyssa 
Machine:   Type: Laptop System: Dell product: XPS 15 9550 v: N/A serial: <superuser/root required> 
           Mobo: Dell model: 0N7TVV v: A00 serial: <superuser/root required> UEFI [Legacy]: Dell v: 1.9.0 date: 10/11/2018

originally posted by @ianozsvald on https://github.com/jupyterlab/jupyterlab/issues/10996

主要语言
Python
星标
734
派生
411
平均合并
1 天 2 小时
30 天内合并 PR
9

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ipython/ipykernel 的其他 Issue

查看 ipython/ipykernel 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。