如何断开与所有调试会话的连接?

 黄河豚 发布于 2023-01-29 13:31

在开发过程中,我经常会遇到多个实时会话.PyCharm为我提供了关闭所有调试器选项卡(或所有其他选项卡)的选项,但是对于每个实时会话,它会打开此对话框,我必须单击每个选项卡以断开连接.有没有办法让PyCharm自动断开连接并终止所有进程?

在此输入图像描述

1 个回答
  • 也许这个问题的最佳答案是不要首先开始所有这些会议.如果您真正想要做的是在启动调试器时终止现有会话,请在"运行/调试配置"对话框中设置"仅单实例"选项.

    在此输入图像描述

    然后每次单击调试图标(或Shift + F9)时,它将停止当前会话并启动一个新会话.在我弄清楚这是做什么之前,即使我不再对它们感兴趣,我最终还会继续运行一些会话.

    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.
    

    2023-01-29 13:33 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有