gpt4 book ai didi

pycharm - 如何断开所有调试 session ?

转载 作者:行者123 更新时间:2023-12-02 08:57:33 24 4
gpt4 key购买 nike

在开发过程中,我经常会进行多次现场 session 。 PyCharm 为我提供了一个关闭所有调试器选项卡(或所有其他选项卡)的选项,但对于每个实时 session ,它都会弹出此对话框,我必须单击每个选项卡才能断开连接。有没有办法让PyCharm自动断开连接并终止所有进程?

enter image description here

最佳答案

也许这个问题的最佳答案是一开始就不要开始所有这些 session 。如果您真正想要做的是在启动调试器时终止现有 session ,请在“运行/调试配置”对话框中设置“仅单个实例”选项。

enter image description here

然后,每次单击调试图标(或 Shift+F9)时,它都会停止当前 session 并启动一个新 session 。在我弄清楚这是做什么之前,我最终会发现许多 session 仍在运行,尽管我对它们不再感兴趣。

PyCharm 帮助说明如下,但根据我的经验,选中此选项后,重新启动调试器只会杀死当前实例并启动一个新实例。当您不希望运行一堆旧实例时,这非常有用,但在构建 Django 应用程序并且您不希望多个实例尝试同时运行时,这一点至关重要。

If this check box is selected, this run/debug configuration cannot be launched more
than once.

Every time a new run/debug configuration is launched, PyCharm checks the presence of
the other instances of the same run/debug configuration, and displays a confirmation
dialog box. If you click OK in the confirmation dialog box, the first instance of
the runner will be stopped, and the next one will take its place.

This make sense, when usage of certain resources can cause conflicts, or when
launching two run/debug configurations of the same type consumes too much of the CPU
and memory resources. If this check box is not selected, it is possible to launch as
many instances of the runner as required. So doing, each runner will start in its own
tab of the Run tool window.

关于pycharm - 如何断开所有调试 session ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21561673/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com