How to close file opened by Debugger automatically after debugging? - debugging

While debugging, whenever we step into a method, the file which defines that method will be opened and remains open after debug - this messed up my files in Visual Studio. I want to be able to close those opened-by-debugger files after the debug finished.
Let's say I'm opening 5 files already and start debugging. After the debug, I have 10+ files opened which means there are 5+ "new & strange" files opened by the debugger. I don't want them, and just want to close them quickly
How can I do this?

There used to be a option "Recycle Windows" in former versions of Visual studio, which only added one additional window for all debug windows. But apparently this has been removed.

I have an idea after a while:
You can pin the tab (tab == file) using addon Visual Studio 2010 Productivity Power Tools. Then after the debug just right click tabs area and call "Remove all but pinned".

Related

How do I enable the debugger in Visual Studio 2019?

The debug type field is greyed out as are the build buttons. I opened a folder in visual studio 2019 with my project and source code files. I have not installed any extensions yet either. I read somewhere to select a startup item but none of the items in the solution explorer are valid except for Gradebook.dll in the debug folder although that doesn't seem to do anything.
Did you try to click the run button or press F5.
If so it should prompt you to select CPU. Then, run it again and it should work.
If that doesn't work try going into "Program.cs" in the Solution Explorer and make sure the Application.Run line is there.

Make Visual Studio 2019 Always Run as Administrator from Start Bar Recent Solutions List

I recently upgraded to Windows 10 and Visual Studio 2019.
Prior to the upgrade, Visual Studio 2017 would always run as Administrator. I did not think much of this, but now that it is gone it is causing me problems.
The primary one is that it will not load my projects that use my local instance of IIS.
I usually launch Visual Studio from my start bar. Right now this goes like this:
Right click on the icon on the start bar and select my solution.
It loads and then I realize that the main project did not load.
Close visual studio, open as admin
Pick my solution and then it loads.
I would really like to only have to do #1 above. Is there someway I can edit the shortcut on the start bar to have it always launch as Administrator?
Turns out that Visual Studio uses different permissions when you click on the list of shortcut options it offers in the start menu. (IE to load a recent solution directly.)
Selecting the Properties->Advanced->"Run as Administrator" did not cause these to run as administrator.
But this did it:
Find devenv.exe (Visual Studio's executable)
Right Click on it and select "Troubleshoot Compatibility".
On the Program Compatibility Troubleshooter window, click on Troubleshoot Program
Check that the program requires additional permissions and click Next
On the next window, click on Test the program… and VS will open as administrator
Click next and then click on Yes, save these settings for this program
Now Visual Studio will ALWAYS run as administrator.
(Taken from: https://ppolyzos.com/2017/08/08/always-run-visual-studio-as-administrator/)

Greenshot does not work in Visual Studio

Anyone know why you cannot use Greenshot in Visual Studio? I hit the Screen Print button and it does not bring up the cross-hairs to drag my window size. Instead it just takes a plain windows screenshot. I looked for keyboard commands that might override it but didnt see anything at first glance. It works for every other program but not when Visual Studio is the active window.
It's because your visual studio is running in a higher level (permission wise) than your greenshot instance.
for a one time test, close Greenshot, and run it as administrator (right click on the file, run as administrator).
As a more permanent solution, you can just set the compatibility mode for the file to be run in admin mode, and then when it's started on start up it should capture your VS instances as well :).
Edit:
Just in case, you can easily figure out if anything else is wired to a shortcut by doing the following:

Visual studio reopen editor after debugging

I started debugging (some C# MVC application) and a lot of windows pop-up. So I closed all of them. But I probably change something.
Now when I have open some files in editor and press Debugging - it close them. After Stop debugging they are still closed. When I try to double-click on file in Solution explorer - nothing happen. Right click and Open - nothing. Only when right-click - Open with... and select another editor, it will open. Sometimes it ask that file is already open and if I want to close him. So it is probably open somewhere.
Any ideas how to fix it? I tried reset all setting, imported old environment, restarted Visual Studio and also computer and nothing helped.
Thank you for help
You can try to Reset Window Layout from the main Window menu in normal and debug modes.
so finally I installed new VS 2015 and everything works as normal

Visual Studio 2013 : how to open multiple projects in different windows?

I'm trying to open two projects in two different windows but every time I double click an other solution, it closes the old project and then it opens the new project in that window. I mean I could do this with VS 2010 but with VS2013, I can't. How do you open multiple projects in different windows ?
EDITS: maybe I can't explain myself well. I want to open two different solutions in two different windows. this will make me able to work on many projects at the same time.
SOLVED:This issue disappeared as I reinstalled the OS!
If you have Windows 8, you just need to search for Visual Studio in the start menu, then right click and choose Open new window. It will open another instance of Visual Studio.
Start visual studio as many times as needed and open each project in each instance of visual studio (file -> Open -> Project/Solution )
in VS13, when you open source code, it opens it in tabs, you can see the name of the tabs right at the top of the window.(the name of the source code will be there) just drag it and move it off Visual studios, somewhere over your desktop and it will open in a new window. I believe that will work. Please let me know if this works, i know i have documentation on viewing tabs in VS, let me find it while you test this :)
if you want a way around opening another instance of VS, open the project by locating it For instance C:\Users\Jonathan\Documents\Visual Studio 2013\Projects thats my default location, open the project there, it opens VS as a new instance
Here is how the problem was solved!
I have created another user in Windows OS
Log on with the new user credentials
Open Visual Studio
The issue remains when I log with another user, that is why I would say it is due to current user settings.

Resources