Can I save multiple command arguments for VS2012 debugging - visual-studio

Summary: Is there an easy way to save alternate command arguments used by the Visual Studio debugger?
Details:
Visual Studio has an option to set Command Argument that are used by the debugger. For example in the screenshot shown here I've set them to FOO BAR. Sometimes when debugging a project I want to switch the arguments to test different input sets. And often the arguments are much longer than just FOO BAR. It would be nice if there was a way to save the arguments that I've typed and switch between them quickly. Ideally it would also be possible to change the working directory at the same time. But I haven't found a way to do this yet so that's why I'm asking here. I'm using Visual Studio Professional 2012.

You can just create new configuration(s) for this project. I see that your current active configuration is Debug (top left corner of project settings dialog). You can create new configuration(s), which will be based on this one, and name them like Debug-Test1, Debug-Test2, etc. After you will do this you will have a choice to switch between this configurations in VS Debug Toolbar.

Related

Command to switch between debug and release in Visual studio

Is there a command that allows me to change the build configuration easily (e.g., Debug or Release) in Visual Studio?
I see the function in the toolbar, but I try to work only with commands if possible. For commands I can easily define aliases and use parameters for direct switching to a known build configuration.
In English the command name is Build.SolutionConfigurations.
And with my Visual Commander extension you can create a direct command to switch a configuration like this:
DTE.ExecuteCommand("Build.SolutionConfigurations", "Debug");
The link Keyboard shortcut to switch between Debug and Release modes in Visual Studio from user3399 provided the right direction:
If I enter in the command window the first characters from a menu, in my case Erstellen, I get code completion, and I tried some commands. In my case
Erstellen.Projektmappenkonfigurationen Release
works like expected. I add an additional alias, and now it's simpler to use:
alias pc Erstellen.Projektmappenkonfigurationen
pc Debug
If somebody can write the English command, I will edit/update my answer for better finding for other users.

Is there a setting to show assemblies as they are loaded during debugging in Visual Studio?

I believe there is a setting (or combination of settings) in Visual Studio that allow you to see in the Immediate Window (or Output Window, I can't remember which), the timestamp and name of an assembly as it is loaded while debugging. I used to have this switched on as it is very useful for finding performance issue areas. Sadly however, when VS recently decided to undock all my windows for no good reason, I had to reset my VS settings and have now lost this.
I can't find for the life of me which setting it was that I had switched on.
Any help appreciated.
Apart from reading Debug output messages in Output window, you can also use Modules Window (at least in Visual Studio 2013) which gives you a nice searchable list of loaded modules with various additional details:
Debug -> Windows -> Modules
In the Output window, change the "Show output from" combo to Debug if necessary. Right-click the window and tick "Module load messages". And any others you might want to see.

Setting up Visual Studio windows

I've set up Visual Studio 2008, exactly as I want it with one screen (got dual monitors) used only for coding and the other setup with multiple tab groups, each containing different tabs, like one group contains the output, error list and todo list tabs, another group has tabs for the toolbox and properties windows.
Now this is all cool and everything, except when if I debug something and I'm done debugging it throws all the tabs together into one group and screws up all my nicely separate tab groups.
Anyone know of anything that will stop Visual Studio from doing this and remember which tabs goes into what groups?
This is because VS has separate layout settings for coding and debugging. The idea being that when coding you don't want things like the output window etc, you want solution explorer and a nice large code window. When debugging, you still want to see code, but also possibly lots of other windows to help you (threads, breakpoints etc).
In fact I believe there are lots of window layouts available (in additional to your own customisation). This is one of the things Visual Studio asks you when you first start it up and are setting up your environment.
The only way I know to resolve this is to also re-arrange your windows "while" debugging. It should remember those settings and switch to them when you are debugging.

Moving an arbitrary setting to a toolbar in Visual Studio

I want to be able to modify a certain setting of Visual Studio right from the toolbar.
Specifically, the number of parallel builds (Tools | Options | Projects and Solutions | Build and Run | maximum number of parallel project builds).
It can be either an edit box right on the toolbar or two buttons setting it to certain values.
I use Visual Studio 2005.
Any suggestions?
Write macros which will modify the two settings, then put macro on toolbar using "Cusomtize"
(almost) any VS command or property has a corresponding scriptable object that you can call in macros.
Do Alt-F11, go into the macro editor, open the object model window and start sniffing around. You can use search to look for the relevant class/function for a given property (e.g. the number of builds). Once you find it, it's just a matter of writing a few VBA lines that change it and, as Ilya suggested, put that macro in your toolbar.
Btw, it should be possible to put an edit box in the toolbar to get the value; but it would probably be much easier just to call InputBox or something to ask the user for the input.

Plugin for Visual Studio to Mimic Eclipse's "Open Type" or "Open Resource" Keyboard Access

If you've ever used Eclipse, you've probably noticed the great keyboard shortcuts that let you hit a shortcut key combination, then just type the first few characters of a function, class, filename, etc. It's even smart enough to put open files first in the list.
I'm looking for a similar functionality for Visual Studio 2008. I know there's a findfiles plugin on codeproject, but that one is buggy and a little weird, and doesn't give me access to functions or classes.
Vs11 (maybe 2010 had it too) has the Navigate To... functionality which (on my machine) has the Ctrl+, shortcut.
By the way it understands capitals as camelcase-shortucts (eclipse does so too). For instance type HH to get HtmlHelper.
This isn't exactly the same as Eclipse from your description, but Visual Studio has some similar features out of the box (I've never used Visual Assist X, but it does sound interesting).
The Find ComboBox in the toolbar ends up being a sort of "Visual Studio command line". You can press Ctrl+/ (by default) to set focus there, and Visual Studio will insert an ">" at the beginning of the text (indicating that you want to enter a command instead of search). It even auto-completes as you type, helping you to find commands.
Anyway, to open a file from there, type "open <filename>". It will display any matching files in the drop down as you type (it pulls the list of files from the currently open solution).
To quickly navigate to a function, in the code editor press Ctrl+I to start an incremental search. Then just start typing until you find what you are looking for. Press Escape to cancel the search, or F3 to search again using the same query. As you are typing in the search query, the status bar in the lower left corner will contain what Visual Studio is searching for. Granted, this won't search across multiple files (I've never used Eclipse much, but that sounds like what it does from your description), but hopefully it will help you at least a little bit.
If anyone stumbles upon this thread:
There's a free plugin (created by me) for Visual Studio 2008 that mimics the Eclipse Ctrl+Shift+R Open Resource dialog (note, not the Open Type dialog). It works with any language and/or project type.
You can find it at Visual Studio Gallery.
Some of the neat features are available in Visual Assist X, though not all of them. I've asked on their forums, but they haven't appeared as yet. VAX gets updated regularly on a rough 4 week period for bug fixes and a new feature every couple of months.
If you are looking for an add-in like this to quickly navigate to source files in your project:
try the Visual Studio 2005/2008 add-in SonicFileFinder.
Resharper does this with the Ctrl-N keyword. Unfortunately it doesn't come for free.
Visual Studio doesn't have anything like this feature beyond Find.
Found this thread while searching for Eclipse's Ctrl+Shift+R, and after seeing the Visual Studio Gallery, found the DPack Tools (they are free, and no, I'm not endorsed in any way by them).
But it's exactly what I was searching:
- Alt+U -> File Browser (a la Eclipse Ctrl+Shift+R)
- Alt+M -> Code Browser (Method list in the actual class)
It has more features, but I'm happy with these ones.
I have been using biterScripting along with Visual Studio to do more flexible searching and manipulation.
It can search the entire workspace.
It can search within any project - EVEN IF THAT PROJECT IS NOT LOADED OR EVEN PART OF A WORKSPACE.
It can find things using regular expressions.
AND, ABOVE ALL, it can make bulk changes. For example, want to change the name of a class from CCustomer to CUser, I can do it in just a few command lines - Actually, I have written scripts for things like this I do often. I DON'T HAVE TO CLICK ON EACH INSTANCE AND MANUALLY DO THE CHANGE.
And, it is inexpensive ($0). I downloaded it from http://www.biterscripting.com .
I'm also comming from the Java Development side and was looking for the CTRL+T feature in the Visual Studio. The other answers refer to open file, but since in C# the class name and file name can be different this is not what i was looking for.
With the Class View or the Object Browser you can search for Objects and Classes
[View]->[Class View] or [View]->[Object]

Resources