Visual Studio 2015 moves undocked windows during debugging - windows

this has been bugging me for quite a while now.
I'm using two monitors and usually have the main window of Visual Studio open on the primary monitor and things like the solution explorer, call stack, error list, output etc. on the second monitor in two separate windows which I split vertically by using the [Win] + [Left | Right] shortcut.
In another environment, this works fine (VS 2013, different machine). Of course, the window positions etc. are different between debug and regular view, but that's not really an issue.
Whenever I start debugging, the solution explorer window moves towards the right on the second monitor. This might even affect the other window (which contains the Call Stack, Output etc.).
After a few debug sessions, the window will be barely visible any more because it has moved so far towards the right...
This is even worse when I have multiple solutions open because then the solution explorer window that I see is actually the one from the instance in the background...
Has anyone else experienced this? Any ideas how to fix this?
P.S.: I'm working on a windows server via a RDP session, maybe that contributes to the problem.

The following worked for me.
Under the Windows menu, save the desired layout with "Save Window Layout". I named mine "Debug". This might have something to do with the old layout names.
Stop debug mode if your in it, and apply that layout with "Apply Window Layout".
Start debug mode.
My un-docked windows flash as if they are resizing, yet stay where I had them in the saved layout.

Related

Visual Studio multiple instances get swapped on windows 10

I always keep two instances of Visual Studio open. Occasionally the positions of the two instances get swapped on the task bar. I guess it is a bug, which has not fixed by Visual Studio team yet. Is there something that I can do in order to prevent that? This is really important to me as I need my old project on the left had side and the new project on the right hand side as I used to. I mainly code using C#, AngularJS and Java Script
VS version - 'Professional 2015'
OS Version – 'Windows 10 Pro'
My guess is that the IDE window becomes unresponsive during some heavy operation (loading project?) and stops getting counted as a window (it gets replaced by a ghost window created by Windows) and when the real window starts responding again it is seen as a new window by the Taskbar and is placed last in its group. You can verify this by running ProcDump with the -h switch.
There is nothing you can do to prevent it. You could file a bug and hope it gets fixed.
If it is that important to you, you could create a little app that hides the "wrong" IDE window and then just shows it again, that should change the order. You could also try playing with ITaskbarList.

switching between one and two displays in visual studio

Most of the time I work Visual Studio with two monitors.
I setup my Visual Studio to sit nicely across both monitors with code on the one side and property windows etc. on the other.
However, occasionally I need to remove into my work station from home where I only have one monitor.
What ends up happening is I have to re-setup my entire workspace to be used on one monitor, and when I get back to my work station I have to undo this again to get to my optimal 2 monitor environment.
Is there a way to save some set layouts in Visual Studio so I could quickly switch back and forward?
Example: One Monitor Layout versus Two Monito Layout?
stumbled upon this which really helped:
link text
The actual solution seems to throw an error for me, but one of the comments suggests you use your "full screen" view to do it.
So I setup my screen the way I like it.
Then I press "shift+alt+enter" which turns on full screen mode.
I then setup my environment for "One Screen mode: (ironic, I know)
Visual Studio now remembers my full screen setup.
So now when I remote in I can just press "shift+alt+enter" and I'm in one screen mode.
Hopefully this post will help someone else, otherwise I would be interested to hear other solutions.
I am using Visual Studio 2010 with Windows 7

Customizing dockable windows in Visual Studio

When developing on a system with dual monitors, I like to make the most of the extra space by stretching Visual Studio across both. It is fantastic to be able to see the Output, Breakpoints, Error List, Object Browser, and ReSharper windows at the same time without having to make them tiny and dock them in the main window, which leaves less space for code.
I place the main VS window on one monitor with the tabbed document and Solution Explorer windows. Any other windows I want to display are placed on the second monitor and docked together. The only problem I encounter with this method is that the main tabbed document window with the VS menu bar is the only window that can be maximized. The additional windows such as Solution Explorer, Breakpoints and Error List can only be stretched, docked or closed. I often go through the tedious work of selecting and laying out secondary windows only to have that layout be erased when I close VS.
Does anyone know of a VS add-in that gives you a window that (1) is maximizable, and (2) other windows can be docked in (ReSharper only does 2) ? Barring that, does anyone know of a good resource to learn how to develop VS add-ins? I am keen to do so myself if necessary.
I don't know of either of your suggestions, although I would also love to see better multiple-monitor support in VS. What I have done, though, is saved various window layouts (Tools > Import and Export Settings, and check only Window Layout) so that I can switch easily when I feel like it.

How can I stop losing all my IDE window position when pressing the start debugging button?

I use Visual Studio 2008. I haven't seen this behavior before and, as far as I know, I didn't change anything in the options.
When I press Start debugging all the possibly windows (watch 1 - 4), data sources, properties, registers (to be honest I have not even ever seen these windows before) appear in front of the code window and stay there after I stop the debugger.
Anyone has an idea what could be causing this ? (I am using CodeRush and Refactor for quite a while now)
When I close and restart visual studio all the windows are where they should be.
PS: Previously I have seen normal switching from normal to debug mode and back with some repositioning changes. That is the way it used to work. Now it is not. It has suddenly gone mad and when going to the debug mode it sometimes shows all possible IDE windows and sometimes not. When it does it no longer returns to the previous state. I cannot find this in the options anywhere.
Visual Studio remembers 2 sets of window layouts, normal mode and debugging mode. My solution is to arrange my normal windows exactly like I want them, then start debugging an application and once again arrange all of the windows the way I want, usually making it as similar to my normal layout as possible, then stopping the debugger and doing a File Exit so that VS saves my settings.
After doing that, it recalls my 2 different layouts each time.
I'm experiencing the same thing - whenever the debugger is running, switching focus back to the IDE immediately caused the debug panel to expand.
I ended up just pinning the debug panel so that it always appears when debugging, and just changing its height as needed.
To add to palehorse, another tip is Full Screen mode.

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

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
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?
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.

Resources