JupyterLab/调试器-调整变量列表 [英] JupyterLab/debugger - Adjust variable list
问题描述
我开始在JupyterLab中使用调试器.通常,它可以正常工作,但是变量列表很长,并且完全包含某种系统变量.在官方教程中,只有"python变量"可见.
有人有想法吗?预先感谢!
记住要按保存.
由于一些用户似乎是来这里寻求复制粘贴答案的(我从不推荐-不要粘贴您不理解的代码!),这是一个小片段,它将消除IPython历史中的许多噪音:
{"variableFilters":{"xpython":["_",退出",退出",调试","get_ipython","_i","_ii","_iii","_ih","_oh","_dh",出",在","_i1","_i2","_i3","_i4","_i5","_i6","_i7","_i8","_i9","_i10","_i11","_i12","_i13","_i14","_i15","_i16","_i17","_i18","_i19","_i20",]}}
I started working with the debugger in JupyterLab. In general, it is working, but the variable list is quite long and full os some kind of system variables. Looking at the official tutorials, there are only the "python variables" visible.
Does anyone have an idea? Thanks in advance!
You can go to the Settings
menu → Advanced Settings Editor
→ Debugger
and then adjust the variableFilters
setting in the User Preferences (right panel) to you liking:
Remember to press save.
Edit: as some users appear to come here for a copy-paste answer (which I never recommend - do not paste code you do not understand!), here is a little snippet that will eliminate a lot of noise from IPython history:
{
"variableFilters": {
"xpython": [
"_",
"quit",
"exit",
"debugpy",
"get_ipython",
"_i",
"_ii",
"_iii",
"_ih",
"_oh",
"_dh",
"Out",
"In",
"_i1",
"_i2",
"_i3",
"_i4",
"_i5",
"_i6",
"_i7",
"_i8",
"_i9",
"_i10",
"_i11",
"_i12",
"_i13",
"_i14",
"_i15",
"_i16",
"_i17",
"_i18",
"_i19",
"_i20",
]
}
}
这篇关于JupyterLab/调试器-调整变量列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!