Command to switch between debug and release in Visual studio - 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.

Related

Integrated terminal in visual studio code is opening externally and not internally

I have reinstalled Visual Studio Code and for some reason, when I do the Ctrl+Shift+` shortcut, instead of opening a terminal window inside VS Code, it's opening an external command window, which is very annoying.
Anyone knows what setting it is to get it back internally?
I tried File->Preferences->Settings->Terminal and then set the first option "Customizes what kind of terminal to launch." to integrated.
Is there any other setting I need to set?
Happened the same with me. It was because I was using Legacy Console. To disable that, open any of your terminal (cmd or powershell) and right click to go to properties.
Properties -> Options -> Use Legacy console (tick it off).
Turn off ConPTY integration in the
File->Preferences->Settings->conPTY->Uncheck it
This is worked for me as mentioned here: https://stackoverflow.com/a/56267064/2462531
Found this:
https://github.com/microsoft/vscode/issues/72033
Which is listed as a duplicate but someone was also kind enough to link to this:
How do I get around the verified bug in Windows 1903 and launch the VSCode integrated terminal?
Which has a workaround as an answer, yay!
Here's some things you can check:
Make sure you've set integrated on both the User and the Workspace settings, because the Workspace settings can override the User settings.
Make sure you are using the correct keyboard shortcut. VS Code actually has a shortcut for opening the system's native console, which will open an external window:
Make sure that your Ctrl+Shift+` is actually the shortcut for Create New Integrated Terminal:

IntelliJ Code Completion

I really like the Code Completion in Visual Studio: I have a Variable called myrandomvariableand when I type myrandfollowed by a dot or a space, VS automatically inserts myrandomvariablefor me. I am so used to this, that in any other IDE I always expect the same behaviour and do not press ctrl+dot, enter or whatevers key combination. As I am using Android Studio I want to know if there exists a way to use the Visual Studio Style Code Completion in a IntelliJ IDE.
Thanks
You can easily enable this feature in IntelliJ.
Go to Settings/Editor/Autocompletion and check insert selected variant by typing dot, space, etc.
Btw: settings section was restructured a bit so this setting might be in a different location in IntelliJ 14 (I currently have 13 installed). But you should be able to find it easily using search dialog in case this is no longer the correct location for IntelliJ 14.

Can I save multiple command arguments for VS2012 debugging

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.

Visual Studio 2010 External Tools - How to automatically attach a debugger to the tool when it is started?

I am writing a DirectShow filter, and when I want to debug it I must:
Run GraphStudio (or GraphEdit) from Tools (I added it to external tools)
Click on Debug > Attach to process...
Search for "GraphStudio" in the process list
Double click on it...
Can this be automated in VisualStudio 2010? Like, I want to select an external tool from Tools menu, and get the debugger automatically attached to it...?
This isn't perfect but it saves you a couple of steps.
In Solution Explorer, right click on your project and select properties. Now select the debugging tab. Change the Command line from $(TargetPath) to GraphStudio.exe (or whatever your process name is). Change the Attach line from No to Yes. Click on OK.
Now your steps are
Run GraphStudio from Tools
Press F5 (or Start | Debug).
The debugger will attach to the process identified by the Command line entry. If there is more than one GraphStudio running it will attach to all of them.
If you don't need to run GraphStudio as an external tool then you can simplify things even further by changing the Attach line back to No and changing the Command line to hold the full pathname of the tool you want to run. If needed you can also set working directory and Command Arguments (switches etc.)
Now just start a debugging session by pressing F5. the debugger will run Graphstudio for you and will attach to that copy only.
You can use gflags or IFEO to do this. I mention it in this answer.

Is there an eclipse equivalent to the Visual Studio "Command Window"?

I've just gotten really hooked on the Visual Studio Command Window, being able to type a lot of command rather than reaching for the mouse. Is there an equivalent in eclipse? Or is there another convenient way to go mouse-less?
The closest editor in Eclipse would be a Scrapbook page, where you can execute Java expressions without having to create a new Java program.
This is a neat way to quickly test an existing class or evaluate a code snippet.
But this isn't exactly equivalent to a Visual Studio Command Window, and more akin to an Immediate Window in Visual Studio.
Still it can be handy.
(source: eclipsezone.com)
(source: eclipsezone.com)
If you are looking for a quick, mouse-less way to type and execute commands, check out the Quick Access feature. Just type Ctrl+3 and start typing the name of a command.
alt text http://img.skitch.com/20100812-dk21k8kfgjx3finmpx1qmnrwj1.png
You can execute commands, however, it is lacking the parameters. Eclipse is missing the scripting capabilities. There are some plugins and projects that try to complement that, but nothing standard.
Window > Show View > Display
In the Display window, you can type whatever Java code you want, select it and evaluate the result clicking on the "Evaluate" button.

Resources