使用VSCode调试笔记本

时间:2019-03-13 15:55:38

标签: python-3.x visual-studio-code jupyter-notebook

我按照here的说明安装和调试Jupyter Notebook。虽然笔记本可以按预期运行,但调试时出现问题。我尝试导入一个我定义了pre_run_cell事件的模块:

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的问题?

0 个答案:

没有答案
相关问题