Python 3.x 用VSCode调试笔记本

Python 3.x 用VSCode调试笔记本,python-3.x,visual-studio-code,jupyter-notebook,Python 3.x,Visual Studio Code,Jupyter Notebook,我按照说明安装和调试Jupyter笔记本。尽管笔记本按预期运行,但调试时我遇到了一个问题。我尝试导入一个模块,在该模块中我定义了一个pre\u run\u单元格事件: from IPython import get_ipython def pre_run_cell(): pass def start(): ip = get_ipython() ip.events.register("pre_run_cell", pre_run_cell) start() 在调试模

我按照说明安装和调试Jupyter笔记本。尽管笔记本按预期运行,但调试时我遇到了一个问题。我尝试导入一个模块,在该模块中我定义了一个
pre\u run\u单元格
事件:

from IPython import get_ipython

def pre_run_cell():
    pass

def start():
    ip = get_ipython()
    ip.events.register("pre_run_cell", pre_run_cell)

start()
在调试模式下,
get_ipython()
方法返回
None
。这是我的
launch.json
中的配置问题(我在righ解释器中保留了默认配置)还是VSC的问题