如何在 vscode 中使用我自定义的 launch.json 创建模板? [英] How to create a template out of my customized launch.json in vscode?

查看:60
本文介绍了如何在 vscode 中使用我自定义的 launch.json 创建模板?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于我的项目,我已经自定义了我的 launch.json 文件.

For my project, I have customized my launch.json file.

如何将我自己的自定义启动配置保存为模板?就像 C++ (GDB/LLDB) 模板这样我每次打开新文件夹(项目)时都可以轻松重复使用它.

How can I save my own customized launch configuration as a template? Just like C++ (GDB/LLDB) template So that I can re-use it easily every time I open a new folder(project).

我不想在全局启动配置下添加它.添加它会开始显示我的启动配置,即使对于此启动配置不合适的其他类型的项目.

I don't want to add it under global launch configuration. Adding it there would start showing up my launch configurations even for other kind of projects where this launch configuration is inappropriate.

我希望实现与 C++ (GDB/LLDB) 模板相同的行为.这是如何实现的?

I wanted to have the same behavior that is achieved for C++ (GDB/LLDB) template. How is that achieved?

编辑 - 我提出了一个增强请求 VSCode GitHub-https://github.com/microsoft/vscode/issues/109234

Edit - I have raised an enhancement request VSCode GitHub- https://github.com/microsoft/vscode/issues/109234

推荐答案

它们是语言扩展中调试器配置的一部分.

They are part of the debugger configuration in the language extension.

为此创建扩展程序太麻烦了.

Way too much trouble to create an extension for this.

只需为 .json 文件创建一个片段并在编辑 .vscode/launch.json

Just create a snippet for a .json file and use it while editing the .vscode/launch.json

这篇关于如何在 vscode 中使用我自定义的 launch.json 创建模板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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