gpt4 book ai didi

visual-studio - Visual Studio : How to open file from Windows command line to specific line in running instance of VS?

转载 作者:行者123 更新时间:2023-12-04 17:41:24 25 4
gpt4 key购买 nike

遗憾的是,无法使用 Windows 命令行在已运行的 Visual Studio 实例中以特定行号打开文件。 (VS 2008)
Open a file in Visual Studio at a specific line number显示了失败的命令行参数组合,并提供了可以在命令行调用的可执行文件的代码 - 但此代码在 VS 2008 中不是开箱即用的。
有谁知道能够完成这项非常基本任务的解决方法(例如 VS 宏)?

最佳答案

如果可以升级到VS2008 SP1,那么Fouré Olivier's answer应该可以在 Visual Studio 的现有实例中打开文件:

devenv /edit FILE_PATH

对于与您链接的答案类似的其他解决方案,有一个类似的 perl 脚本 here和一个 python 插件 here (见 dte_put_file)。两者都与 vim 一起使用,但您可以将它们修复以用于任何事情。 (我没有使用过它们中的任何一个。)

关于visual-studio - Visual Studio : How to open file from Windows command line to specific line in running instance of VS?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3219380/

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