如何使用远程VSCODE中的VSCODE任务打开文件
我希望能够使用新VSCODE任务功能在远程VSCODE中。这很有用,因为我想打开一堆TMP中的同一链接日志文件,而且我不想每次都输入他们的全名。理想情况下,这将是这样的:
{
"label": "$(play) open log file",
"type": "shell",
"command": "code /tmp/logfile.INFO",
"group": "build",
},
如果我在普通的VSCODE终端中运行相同的命令,它将正确打开文件。如果我在任务中运行它,则环境在路径中没有VSCODE的垃圾箱。如果我更改任务中的代码以使用删除VSCODE的直接路径,那么它会抱怨说“命令仅在WSL中或视觉工作室代码终端中可用”。
我尚不清楚这是否失败,因为它是远程VSCODE,还是由于无法在任务中打开代码而失败。无论哪种方式,这样做都很高兴:)
I'd like to be able to use the new vscode tasks feature to open a file in remote vscode. This is useful because I have a bunch of symlinked log files in tmp that I would like to open, and I don't want to type their whole name every time. Ideally it would be something like this:
{
"label": "$(play) open log file",
"type": "shell",
"command": "code /tmp/logfile.INFO",
"group": "build",
},
If I run the same command in the normal vscode terminal, it opens the file correctly. If I run it in the task, the environment doesn't have vscode's bin in the path. If I change code in the task to use the direct path of the remove vscode, it then complains saying "Command is only available in WSL or inside a Visual Studio Code terminal."
I'm unclear if this fails because it is remote vscode or if it fails because it's not possible to open code in a task. Either way it'd be nice to do so :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论