最佳方法调试和设置了在Kubernetes Pod中运行的代码的断点?

发布于 2025-01-31 19:41:15 字数 176 浏览 4 评论 0原文

我的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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

乖乖哒 2025-02-07 19:41:15

查看 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文