48

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?

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

LittleBobbyTables - Au Revoir
  • 32,008
  • 25
  • 109
  • 114
Bryan Denny
  • 27,363
  • 32
  • 109
  • 125
  • 18
    I am surprised that Visual Studio is not considered software "used primarily for programming". – timbo Nov 06 '15 at 04:49

11 Answers11

83

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

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

like this

philx_x
  • 1,708
  • 16
  • 23
  • 9
    Simple and super effective. This is perhaps the only answer that addresses the actual question. – valsidalv Jan 15 '15 at 23:04
  • 2
    agreed. +1 for answering the question, great tip too. doh! should have thought of that – TheZenker May 12 '15 at 12:52
  • 11
    Update September 2016: Came here through Googling this question and this no longer seems to work. You'll now have to drag the Tab in to a New Window (which can found created by by right-clicking the taskbar icon and selecting new window). – Tom.K Sep 28 '16 at 12:08
  • 2
    @Tom.K, just checked in v2017, and I was able to drag tabs outside of the IDE just fine. – BillF Mar 02 '18 at 22:17
  • @BillF - Hm interesting! I'll have to try it out, previously I wasn't able to get it to work :) – Tom.K Mar 05 '18 at 15:54
  • 5
    Doesn't work anymore. None of the described ways. When dragging on Desktop it creates a txt file and inside VS CODE it does just nothing. – Matthis Kohli Apr 18 '18 at 11:28
  • 1
    This works for me, better yet you can right click the solution and and select "New solution explorer Window" and dock a second solution explorer on your second screen too. Files you open from the second solution explorer will open in your second screen. I find this an efficient setup. – Shaun Keon Sep 26 '18 at 00:19
  • 1
    This doesn't work for VS Code but it works for Visual Studio. – Jonathas Costa Apr 29 '20 at 13:22
60

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.

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.

David Wengier
  • 10,061
  • 5
  • 39
  • 43
9

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.

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.

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.

The How-To Geek
  • 1,105
  • 9
  • 13
3

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.

Tarks
  • 4,127
  • 6
  • 38
  • 43
2

Three monitors -- all 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)

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.

tvanfosson
  • 524,688
  • 99
  • 697
  • 795
  • 1
    hurrah for another triple monitor 4:3 style user... i love this for coding and have two in potrait and 1 in regular for the UI testing. – sheldonhull Jun 25 '12 at 12:17
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..

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

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.

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

EndangeredMassa
  • 17,208
  • 8
  • 55
  • 79
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

ram
  • 11,468
  • 16
  • 63
  • 89
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.

the_mandrill
  • 29,792
  • 6
  • 64
  • 93
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..

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.

KMessenger
  • 81
  • 1
  • 3
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.

Dax Fohl
  • 10,654
  • 6
  • 46
  • 90