Visual Studio和双/多显示器:如何从显示器中优化使用?

时间:2023-02-05 11:41:17

Ultramon is a great program for dual monitors (stretching screen across monitors), but I was wondering if there is any way do to something in Visual Studio like have one tab of code open on one monitor and a second tab of code open on the second monitor with only one instance of Visual Studio running?

Ultramon是一个很棒的双显示器程序(在显示器上拉伸屏幕),但我想知道在Visual Studio中是否有任何方法可以在一台显示器上打开一个代码选项卡,在第二个显示器上打开第二个代码选项卡监视器只运行一个Visual Studio实例?

Or are there any other suggestions on getting most bang for buck on dual monitors and Visual Studio?

或者是否有任何其他建议可以在双显示器和Visual Studio上获得最大的收益?

11 个解决方案

#1


58  

Personally, I have my windows set up so that one my main monitor, I have the main visual studio monitor, so therefore my code window, maximized, with only the toolbox docked, on the left. This means the code window takes up as much space as possible, while keeping the left hand edge of the code close to the middle of the screen, where my eyes naturally look. My main monitor is a wide screen, so I find that gives me more than enough room for my code.

就个人而言,我设置了我的窗口,以便我的主显示器,我有主视觉工作室监视器,因此我的代码窗口最大化,只有工具箱停靠在左侧。这意味着代码窗口占用尽可能多的空间,同时保持代码的左手边缘靠近屏幕中间,我的眼睛自然看起来。我的主显示器是一个宽屏幕,所以我发现这为我的代码提供了足够的空间。

My secondary monitor has a second window, which contains the tool windows that I use. So I have solution explorer, error list, task list (//todo: comments), output window, find results etc. all taking up as much space as they like on my secondary monitor.

我的辅助监视器有第二个窗口,其中包含我使用的工具窗口。所以我有解决方案资源管理器,错误列表,任务列表(//待办事项:评论),输出窗口,查找结果等所有在我的辅助监视器上占用尽可能多的空间。

When debugging, the solution explorer moves the main monitor, and the watch, autos and locals windows take its place.

在调试时,解决方案资源管理器会移动主监视器,而watch,autos和locals窗口将取代它。

I find this gives me a very large area to write code, and really helps usage of all of those additional windows, by giving them more real estate than they'd usually have.

我发现这给了我一个非常大的区域来编写代码,并且真正有助于使用所有这些额外的窗口,通过给予它们比通常更多的空间。

Update: In response to everyone talking about using the second monitor for documentation or running the app, I wholeheartedly agree, and forgot to mention how I do that. I use PowerMenu alot to acheive this. Basically I can right-click on any window and set Always On Top. So while i'm debugging, i want to see my output window, but then if I have to refer to some documentation, I just flick to Mozilla (on the second monitor), set it on top, and go back to visual studio. I find this lets me manage the tool windows without having to either shuffle them around a lot, or take up valuable space in the code window.

更新:为了回应每个人都在谈论使用第二台显示器进行文档编写或运行应用程序,我全心全意地同意,并忘了提及我是如何做到这一点的。我使用PowerMenu来实现这一目标。基本上我可以右键单击任何窗口并设置Always On Top。因此,当我正在调试时,我想查看我的输出窗口,但是如果我必须参考一些文档,我只需要轻弹到Mozilla(在第二台显示器上),将其设置在顶部,然后返回到visual studio。我发现这让我可以管理工具窗口,而无需在很多地方对它们进行洗牌,或者占用代码窗口中的宝贵空间。

#2


42  

have one tab of code open on one monitor and a second tab of code open on the second monitor with only one instance of Visual Studio running

在一个监视器上打开一个代码选项卡,在第二个监视器上打开第二个代码选项卡,只运行一个Visual Studio实例

you can simply drag a Tab outside of VS onto your other screen.

您只需将VS外部的Tab拖到另一个屏幕上即可。

Visual Studio和双/多显示器:如何从显示器中优化使用?

#3


7  

I have three monitors, so I usually run with this configuration:

我有三个显示器,所以我通常运行此配置:

  • Left Monitor: documentation / ebooks.
  • 左监视器:文档/电子书。

  • Middle Monitor: code / debugging
  • 中监视器:代码/调试

  • Right Monitor: Test application / scrolling logfiles (if needed)
  • Right Monitor:测试应用程序/滚动日志文件(如果需要)

This usually works pretty well, and since the monitors are fairly big I rarely need to use the test application in full-screen, so there's plenty of room for my tail -f windows.

这通常很有效,而且由于显示器相当大,我很少需要全屏使用测试应用程序,因此我的尾部-f窗口有足够的空间。

I also use AutoHotkey to assign hotkeys that flip to the most important windows, like Firefox or my SSH session. That way I can simply use a shortcut key to access them when necessary.

我还使用AutoHotkey来分配翻转到最重要的窗口的热键,例如Firefox或我的SSH会话。这样我就可以在必要时使用快捷键来访问它们。

The left monitor is actually a separate computer running Linux and keyboard/mouse shared with Synergy, so I have multiple ebooks or documentation pages open, one on each virtual desktop... I can flip between the documentation by moving my mouse to the left and using a shortcut key.

左侧显示器实际上是一台运行Linux和与Synergy共享的键盘/鼠标的独立计算机,因此我打开了多个电子书或文档页面,每个虚拟桌面上有一个...我可以通过将鼠标向左移动来翻转文档。使用快捷键。

#4


2  

For GUI debugging is awesome being able to run the app into one screen and having the debugger in another screen. That's one of the most practical uses..

对于GUI调试非常棒,能够将应用程序运行到一个屏幕并将调试器放在另一个屏幕中。这是最实际的用途之一..

But really, depends on which kind of application you're developing, i.e., if you need to monitor open file handles, logs, etc.

但实际上,取决于您正在开发的应用程序类型,即,是否需要监视打开的文件句柄,日志等。

#5


2  

When I first got two monitors I wanted to do the same as you, use all the space for visual studio, but I think that you come to realize that it's best to keep VS on one monitor and use the second monitor for documentation, external resources etc. You wouldn't think it at first, but all the little touches like just being able to maximize other resources without them hiding your code is a great feature.

当我第一次使用两台显示器时,我想和你一样,使用视觉工作室的所有空间,但我认为你会发现最好将VS放在一台显示器上并使用第二台显示器来记录文档,外部资源你最初不会想到这一点,但所有的小动作,如只是能够最大化其他资源而不隐藏你的代码是一个很好的功能。

#6


2  

I have VS in my left monitor and the GUI/running window in the right. However, if you want to have to code tabs open on each monitor, you could use UltraMon's option to expand a window across both monitors, then drag a code page over such that it puts up a divider. Then, you align that divider with the break in your monitors.

我的左侧监视器中有VS,右侧是GUI /运行窗口。但是,如果您希望在每个监视器上打开代码选项卡,则可以使用UltraMon选项在两个监视器上展开窗口,然后拖动代码页以便它放置分隔符。然后,将该分隔符与监视器中的中断对齐。

I've done that before, just to test it out. It's not a bad setup.

我以前做过,只是为了测试它。这不是一个糟糕的设置。

#7


2  

Three monitors -- all 1600x1200

三台显示器 - 全部1600x1200

  • Left: Email, IM, SQL Server Management Studio, Remote Desktops to servers
  • 左:电子邮件,IM,SQL Server Management Studio,远程桌面到服务器

  • Middle: VisualStudio -- maybe multiple instances -- maximized, solution explorer and team explorer docked on right, errors/output docked bottom, others auto-hide
  • 中间:VisualStudio - 可能是多个实例 - 最大化,解决方案资源管理器和团队资源管理器停靠在右侧,错误/输出停靠在底部,其他自动隐藏

  • Right: Web browsers -- app debugging and normal web work, ADUC (if needed)
  • 右:Web浏览器 - 应用程序调试和正常Web工作,ADUC(如果需要)

Other apps get moved around depending on what I'm working on and how crowded the monitors are and the interaction between the app that's open and what I need the info from it for.

其他应用程序会根据我正在处理的内容以及监视器的拥挤程度以及打开的应用程序与我需要的信息之间的交互而移动。

#8


1  

I have three monitors, set up where Visual Studio is full screen on the middle monitor, the right hand monitor has all the tool windows configured and the left monitor is for browser, help, SSMS, email, etc..

我有三台显示器,在中间显示器上设置Visual Studio全屏,右侧显示器配置了所有工具窗口,左侧显示器用于浏览器,帮助,SSMS,电子邮件等。

Works well except if I have to remote in, so I have a separate exported configuration to bring move the tool windows back into Visual Studio, and one to set them back up for multiple monitors.

除非我必须远程进入,否则运行良好,因此我有一个单独的导出配置将工具窗口移回Visual Studio,另一个用于将它们备份为多个监视器。

#9


1  

Though I use StudioTools for other purposes, it has a "Tear off Editor" option, with which you can "tear off" the file to a window and resize the window. Find it quite helpful

虽然我将StudioTools用于其他目的,但它有一个“Tear off Editor”选项,您可以使用该选项将文件“撕下”到窗口并调整窗口大小。发现它非常有帮助

#10


1  

I find the Code Definition window absolutely invaluable to have open in my other monitor. As the cursor moves over a type name in your editor the other window shows its definition.

我发现代码定义窗口在我的其他监视器中打开是绝对无价的。当光标移动到编辑器中的类型名称时,另一个窗口会显示其定义。

#11


0  

You could try right-clicking a file in solution explorer, Open With, and then go find devenv.exe. That will open it up in a new instance of VS. Plus, it saves devenv as one of your default options in the future, so you don't have to go hunting around for devenv all the time. Not beautiful, but an option.

您可以尝试右键单击解决方案资源管理器中的文件,打开方式,然后查找devenv.exe。这将在VS的新实例中打开它。此外,它将devenv作为您未来的默认选项之一,因此您无需一直寻找devenv。不漂亮,但是一个选择。

#1


58  

Personally, I have my windows set up so that one my main monitor, I have the main visual studio monitor, so therefore my code window, maximized, with only the toolbox docked, on the left. This means the code window takes up as much space as possible, while keeping the left hand edge of the code close to the middle of the screen, where my eyes naturally look. My main monitor is a wide screen, so I find that gives me more than enough room for my code.

就个人而言,我设置了我的窗口,以便我的主显示器,我有主视觉工作室监视器,因此我的代码窗口最大化,只有工具箱停靠在左侧。这意味着代码窗口占用尽可能多的空间,同时保持代码的左手边缘靠近屏幕中间,我的眼睛自然看起来。我的主显示器是一个宽屏幕,所以我发现这为我的代码提供了足够的空间。

My secondary monitor has a second window, which contains the tool windows that I use. So I have solution explorer, error list, task list (//todo: comments), output window, find results etc. all taking up as much space as they like on my secondary monitor.

我的辅助监视器有第二个窗口,其中包含我使用的工具窗口。所以我有解决方案资源管理器,错误列表,任务列表(//待办事项:评论),输出窗口,查找结果等所有在我的辅助监视器上占用尽可能多的空间。

When debugging, the solution explorer moves the main monitor, and the watch, autos and locals windows take its place.

在调试时,解决方案资源管理器会移动主监视器,而watch,autos和locals窗口将取代它。

I find this gives me a very large area to write code, and really helps usage of all of those additional windows, by giving them more real estate than they'd usually have.

我发现这给了我一个非常大的区域来编写代码,并且真正有助于使用所有这些额外的窗口,通过给予它们比通常更多的空间。

Update: In response to everyone talking about using the second monitor for documentation or running the app, I wholeheartedly agree, and forgot to mention how I do that. I use PowerMenu alot to acheive this. Basically I can right-click on any window and set Always On Top. So while i'm debugging, i want to see my output window, but then if I have to refer to some documentation, I just flick to Mozilla (on the second monitor), set it on top, and go back to visual studio. I find this lets me manage the tool windows without having to either shuffle them around a lot, or take up valuable space in the code window.

更新:为了回应每个人都在谈论使用第二台显示器进行文档编写或运行应用程序,我全心全意地同意,并忘了提及我是如何做到这一点的。我使用PowerMenu来实现这一目标。基本上我可以右键单击任何窗口并设置Always On Top。因此,当我正在调试时,我想查看我的输出窗口,但是如果我必须参考一些文档,我只需要轻弹到Mozilla(在第二台显示器上),将其设置在顶部,然后返回到visual studio。我发现这让我可以管理工具窗口,而无需在很多地方对它们进行洗牌,或者占用代码窗口中的宝贵空间。

#2


42  

have one tab of code open on one monitor and a second tab of code open on the second monitor with only one instance of Visual Studio running

在一个监视器上打开一个代码选项卡,在第二个监视器上打开第二个代码选项卡,只运行一个Visual Studio实例

you can simply drag a Tab outside of VS onto your other screen.

您只需将VS外部的Tab拖到另一个屏幕上即可。

Visual Studio和双/多显示器:如何从显示器中优化使用?

#3


7  

I have three monitors, so I usually run with this configuration:

我有三个显示器,所以我通常运行此配置:

  • Left Monitor: documentation / ebooks.
  • 左监视器:文档/电子书。

  • Middle Monitor: code / debugging
  • 中监视器:代码/调试

  • Right Monitor: Test application / scrolling logfiles (if needed)
  • Right Monitor:测试应用程序/滚动日志文件(如果需要)

This usually works pretty well, and since the monitors are fairly big I rarely need to use the test application in full-screen, so there's plenty of room for my tail -f windows.

这通常很有效,而且由于显示器相当大,我很少需要全屏使用测试应用程序,因此我的尾部-f窗口有足够的空间。

I also use AutoHotkey to assign hotkeys that flip to the most important windows, like Firefox or my SSH session. That way I can simply use a shortcut key to access them when necessary.

我还使用AutoHotkey来分配翻转到最重要的窗口的热键,例如Firefox或我的SSH会话。这样我就可以在必要时使用快捷键来访问它们。

The left monitor is actually a separate computer running Linux and keyboard/mouse shared with Synergy, so I have multiple ebooks or documentation pages open, one on each virtual desktop... I can flip between the documentation by moving my mouse to the left and using a shortcut key.

左侧显示器实际上是一台运行Linux和与Synergy共享的键盘/鼠标的独立计算机,因此我打开了多个电子书或文档页面,每个虚拟桌面上有一个...我可以通过将鼠标向左移动来翻转文档。使用快捷键。

#4


2  

For GUI debugging is awesome being able to run the app into one screen and having the debugger in another screen. That's one of the most practical uses..

对于GUI调试非常棒,能够将应用程序运行到一个屏幕并将调试器放在另一个屏幕中。这是最实际的用途之一..

But really, depends on which kind of application you're developing, i.e., if you need to monitor open file handles, logs, etc.

但实际上,取决于您正在开发的应用程序类型,即,是否需要监视打开的文件句柄,日志等。

#5


2  

When I first got two monitors I wanted to do the same as you, use all the space for visual studio, but I think that you come to realize that it's best to keep VS on one monitor and use the second monitor for documentation, external resources etc. You wouldn't think it at first, but all the little touches like just being able to maximize other resources without them hiding your code is a great feature.

当我第一次使用两台显示器时,我想和你一样,使用视觉工作室的所有空间,但我认为你会发现最好将VS放在一台显示器上并使用第二台显示器来记录文档,外部资源你最初不会想到这一点,但所有的小动作,如只是能够最大化其他资源而不隐藏你的代码是一个很好的功能。

#6


2  

I have VS in my left monitor and the GUI/running window in the right. However, if you want to have to code tabs open on each monitor, you could use UltraMon's option to expand a window across both monitors, then drag a code page over such that it puts up a divider. Then, you align that divider with the break in your monitors.

我的左侧监视器中有VS,右侧是GUI /运行窗口。但是,如果您希望在每个监视器上打开代码选项卡,则可以使用UltraMon选项在两个监视器上展开窗口,然后拖动代码页以便它放置分隔符。然后,将该分隔符与监视器中的中断对齐。

I've done that before, just to test it out. It's not a bad setup.

我以前做过,只是为了测试它。这不是一个糟糕的设置。

#7


2  

Three monitors -- all 1600x1200

三台显示器 - 全部1600x1200

  • Left: Email, IM, SQL Server Management Studio, Remote Desktops to servers
  • 左:电子邮件,IM,SQL Server Management Studio,远程桌面到服务器

  • Middle: VisualStudio -- maybe multiple instances -- maximized, solution explorer and team explorer docked on right, errors/output docked bottom, others auto-hide
  • 中间:VisualStudio - 可能是多个实例 - 最大化,解决方案资源管理器和团队资源管理器停靠在右侧,错误/输出停靠在底部,其他自动隐藏

  • Right: Web browsers -- app debugging and normal web work, ADUC (if needed)
  • 右:Web浏览器 - 应用程序调试和正常Web工作,ADUC(如果需要)

Other apps get moved around depending on what I'm working on and how crowded the monitors are and the interaction between the app that's open and what I need the info from it for.

其他应用程序会根据我正在处理的内容以及监视器的拥挤程度以及打开的应用程序与我需要的信息之间的交互而移动。

#8


1  

I have three monitors, set up where Visual Studio is full screen on the middle monitor, the right hand monitor has all the tool windows configured and the left monitor is for browser, help, SSMS, email, etc..

我有三台显示器,在中间显示器上设置Visual Studio全屏,右侧显示器配置了所有工具窗口,左侧显示器用于浏览器,帮助,SSMS,电子邮件等。

Works well except if I have to remote in, so I have a separate exported configuration to bring move the tool windows back into Visual Studio, and one to set them back up for multiple monitors.

除非我必须远程进入,否则运行良好,因此我有一个单独的导出配置将工具窗口移回Visual Studio,另一个用于将它们备份为多个监视器。

#9


1  

Though I use StudioTools for other purposes, it has a "Tear off Editor" option, with which you can "tear off" the file to a window and resize the window. Find it quite helpful

虽然我将StudioTools用于其他目的,但它有一个“Tear off Editor”选项,您可以使用该选项将文件“撕下”到窗口并调整窗口大小。发现它非常有帮助

#10


1  

I find the Code Definition window absolutely invaluable to have open in my other monitor. As the cursor moves over a type name in your editor the other window shows its definition.

我发现代码定义窗口在我的其他监视器中打开是绝对无价的。当光标移动到编辑器中的类型名称时,另一个窗口会显示其定义。

#11


0  

You could try right-clicking a file in solution explorer, Open With, and then go find devenv.exe. That will open it up in a new instance of VS. Plus, it saves devenv as one of your default options in the future, so you don't have to go hunting around for devenv all the time. Not beautiful, but an option.

您可以尝试右键单击解决方案资源管理器中的文件,打开方式,然后查找devenv.exe。这将在VS的新实例中打开它。此外,它将devenv作为您未来的默认选项之一,因此您无需一直寻找devenv。不漂亮,但是一个选择。