gpt4 book ai didi

visual-studio-code - 需要澄清 vs 代码调试

转载 作者:行者123 更新时间:2023-12-04 09:31:00 27 4
gpt4 key购买 nike

谁能解释一下我在互联网上找到的 VSCode 上的这三个调试符号?
我的 vs 代码有一个带有播放图标的代码。
在线调试的所有演示都在中间。我怎么得到它?
此外,节点 js 调试已安装,但我认为它显示为已禁用,我找不到启用它的选项。
enter image description here

最佳答案

直接回答你的问题 [TL;DR]:如果你使用的是最新版本的 vscode,你已经拥有了。它将带您进入与右侧相同的 View

如果您查看 codicon 库 ref你指出的中间那个不存在。
Visual Studio Code 于 2020 年 2 月进行了更改 ref将运行和调试结合起来更和谐:

User studies revealed that new users have difficulties finding how to run their programs in VS Code. One reason is that the existing "Debugging" functionality is not something that they relate to "Running" a program. For that reason, we are making "Run" more prominent in the UI.

  • The main menu Debug has become the Run menu.
  • The Run and Debug view has become the Run view and the corresponding Activity Bar icon now shows a large "Play" icon with a small "bug" decoration.

所以换句话说,没有区别。 “运行”和“调试” View 是同义词,图标反射(reflect)了这些更改。正如他们所指出的,调试 View 现在称为“运行” View ,但它仍然提供调试和断点。
但是,您遇到了两种可能性:
  • 您使用的教程和指南已经过时(显示的是过时的 vscode 版本)
  • 本教程或指南正在使用提供调试功能的扩展。扩展程序可以控制您看到的图标
  • 根据 2020 年 6 月 ref,该扩展名用于单文件调试注意,vscode 推荐以下内容:

  • For debug extensions that want to improve the single file debug experience by adding a "Run" and/or "Debug" button to the editor, we recommend following these guidelines for a consistent look and feel:

    • Contribute Run and/or Debug commands in the package.json (see Mock Debug):
      • Use the command titles "Run File"/"Debug File" or "Run Python File"/"Debug Python File".
      • Use the $(play) icon for Run and $(debug-alt-small) for Debug.


    他们在哪里 codicon library已于 6 月更新以反射(reflect)以下内容:
    debug codicon library
    如您所见,它们都没有像“run”这样的措辞前缀,但它们都代表相同的功能。
    此外,您还可能会看到此图标:
    debug console
    这表示调试输出将进入的面板( View )。

    关于visual-studio-code - 需要澄清 vs 代码调试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62844509/

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