VSC命令日志 [英] VSC Command Log

查看:40
本文介绍了VSC命令日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

试图弄清楚如何为特定命令创建键绑定.我可以在面板中看到该命令,但是它没有绑定,因此在keybindings.json中看不到它.

Trying to figure out how to create a key binding for a specific command. I can see the command in the pallete but it has no bindings so I can't see it in the keybindings.json.

有什么办法可以记录VSC中正在执行的所有命令,以便我可以执行该命令并在日志中查看命令名称?

Is there any way I can LOG all commands being executed within VSC so that I can perform the command and see the command name in the log?

为清楚起见:

  • 我想让一般方法知道如何找到发出的命令及其命令ID.
  • 我已经知道我在默认键绑定文件中找到了一些命令,但这不是查找已运行命令的通用方法.它没有列出所有命令,也没有说明它们各自是什么,并且您不能使用它来验证它是否是您执行的命令.
  • I want general method to know how I can find what commands were issued along with their command IDs.
  • I already know I find some commands in the default keybindings file and that's NOT a general way to find the command you have run. It doesn't list all command not does it explain what they each are and you can't use it to verify that it is the command you executed.

推荐答案

您也可以使用键盘快捷键(首选项:打开键盘快捷键命令)创建绑定.您可以按命令名称进行搜索,甚至可以检查其对应的ID:

You can create binding using Keyboard Shortcuts as well (Preferences: Open Keyboard Shortcuts command). You can search by command name and and even check its corresponding id:

第二个选项是,您可以启用跟踪并在输出面板中查看已执行的命令(尽管它似乎不记录从命令选项板执行的命令):

Second option is that you can enable tracing and see executed commands in output panel (it looks like it doesn't log commands executed from command palette though):

  1. 将日志级别设置为 trace .您可以在启动VS Code时传递--log参数,例如: code --log trace (由于某些原因对我不起作用)或执行 Developer:Set Log Level ...从命令面板:

  1. Set log level to trace. You can either pass --log argument when starting VS Code like: code --log trace (doesn't work for me for some reason) or execute Developer: Set Log Level... from command palette:

在那之后,您应该在窗口面板的输出面板中看到已执行的命令.

After that, you should see executed commands in output panel for Window process.

这篇关于VSC命令日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆