visual-studio Visual Studio 和双/多显示器:如何优化显示器的使用?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6937/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 16:21:06  来源:igfitidea点击:

Visual Studio and dual/multiple monitors: how do I get optimized use out of my monitors?

visual-studiomonitormultiple-monitors

提问by Bryan Denny

Ultramonis 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 上获得最大收益?

回答by philx_x

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 拖到另一个屏幕上。

like this

像这样

回答by David Wengier

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.

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

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.

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

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

调试时,解决方案资源管理器移动主监视器,手表、汽车和本地窗口取而代之。

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 PowerMenualot 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来实现这一点。基本上我可以右键单击任何窗口并设置“始终在最前面”。因此,当我在调试时,我想查看我的输出窗口,但是如果我必须参考某些文档,我只需轻触 Mozilla(在第二台显示器上),将其设置在顶部,然后返回到 Visual Studio。我发现这让我可以管理工具窗口,而不必将它们随意移动,也不必占用代码窗口中的宝贵空间。

回答by The How-To Geek

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)
  • 左监视器:文档/电子书。
  • 中间监视器:代码/调试
  • 右监视器:测试应用程序/滚动日志文件(如果需要)

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.

这通常效果很好,而且由于显示器相当大,我很少需要全屏使用测试应用程序,所以我的 tail -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 共享,所以我打开了多个电子书或文档页面,每个虚拟桌面上都有一个......我可以通过将鼠标移到左边和在文档之间切换使用快捷键。

回答by tvanfosson

Three monitors -- all 1600x1200

三台显示器——均为 1600x1200

  • Left: Email, IM, SQL Server Management Studio, Remote Desktops to servers
  • Middle: VisualStudio -- maybe multiple instances -- maximized, solution explorer and team explorer docked on right, errors/output docked bottom, others auto-hide
  • Right: Web browsers -- app debugging and normal web work, ADUC (if needed)
  • 左:电子邮件、IM、SQL Server Management Studio、远程桌面到服务器
  • 中间:VisualStudio——可能有多个实例——最大化,解决方案资源管理器和团队资源管理器停靠在右侧,错误/输出停靠在底部,其他自动隐藏
  • 右图: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.

其他应用程序的移动取决于我正在处理的内容以及监视器的拥挤程度以及打开的应用程序之间的交互以及我需要从中获取信息的目的。

回答by EndangeredMassa

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.

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

回答by EndangeredMassa

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.

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

回答by Tarks

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 放在一台显示器上,使用第二台显示器来记录文档、外部资源等等。一开始你不会这么想,但所有的小细节,比如能够最大限度地利用其他资源而不隐藏你的代码,都是一个很棒的功能。

回答by KMessenger

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,还有一个可以将它们设置为多个监视器。

回答by ram

Though I use StudioToolsfor 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用于其他目的,但它有一个“撕下编辑器”选项,您可以使用该选项将文件“撕下”到一个窗口并调整窗口大小。觉得很有帮助

回答by the_mandrill

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.

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