我想调试一个 websauna 应用程序的运行时,所以我设置了一个
pdb.set_trace()
在
system/admin/views.py:87 像这样,
@view_config(context=ModelAdmin.Resource, name="show", renderer="crud/show.html", route_name="admin", permission='view')
def show(self):
# We override this method just to define admin route_name traversing
import pdb; pdb.set_trace()
return super(Show, self).show()
但我得到金字塔运行时错误:
ValueError: signal only works in main thread
如何避免出现此运行时错误并在 set_trace() 上中断?