最佳方法调试和设置了在Kubernetes Pod中运行的代码的断点?
我的kubernetes群集中有一个POD运行代码,并具有许多依赖关系,我发现自己想只是设置断点,并在执行过程中检查不同的变量和状态。到目前为止,我一直在依靠日志来查找错误,但是迭代周期太慢了,我喜欢的速度太慢了。
有没有办法设置一些可以让我使用IDE进行交流并直接在吊舱内进行断点进行调试的方法?我首选的IDE是VS代码。
I have a pod running code inside my Kubernetes cluster with many dependencies and I have found myself wanting to just setup a breakpoint and inspect different variables and state during execution. So far, I have been relying on logs to find errors, but the iteration cycles are just too slow to my liking.
Is there a way to set something up that would allow me to communicate using my IDE and debug my code with breakpoints directly inside a pod? My preferred IDE is VS Code.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看 vs代码的云代码。
总的来说,在Kubernetes中对应用程序进行调试并不是那么简单,因为介于两者之间。
Check out Cloud Code for VS Code.
In general debugging apps in Kubernetes is not that simple, because there are a lot of layers in between.