我目前正在通过 kubernetes 在 python3 下运行 django 应用程序skaffold dev。我使用 Python 源代码进行热重载。目前是否可以在 kubernetes 上使用 python 进行交互式调试?
例如,
def index(request):
import pdb; pdb.set_trace()
return render(request, 'index.html', {})
通常,在容器外,点击端点会使我掉入(pdb)外壳中。
在当前设置中,我在文件中设置了stdin和ttyto 。代码确实在断点处停止,但它不允许我访问shell。trueDeployment(pdb)