Scott Hanselman

A proper terminal for Visual Studio

August 03, 2017 Comment on this post [29] Posted in VS2017
Sponsored By

Whack Whack Terminal is an experimental free plugin for Visual Studio 2017 that aims to bring a full terminal inside of Visual Studio. Those of you who use Visual Studio Code have long enjoyed the integrated xtermjs terminal. Justin Clareburt worked with Daniel Griffen on hacking together this solution as an experiment. There is no plans for it to be more than an experiment, I'm told BUT I always say vote with your feet. I figure a few tens of thousands of installs and someone will decide to build it in. I have long used Mads Kristensen's Quake Mode that lets me launch a command prompt from VS, but ever since the NuGet Package manager showed up in VS many years ago, I've always wanted a real FULL terminal in VS.

Today, the code is alpha quality, so expect it will actively improve, and don't be mean in the GitHub Issues. They've versioned it at 0.2, and is aiming for parity with the features in the terminal in VSCode for version 1.0.

Still, go install WhackWhack in VS2017 NOW! Nothing ventured, nothing gained!

Hey it's a real terminal inside of Visual Studio

I'm sure they will update it with lots of great features like changing the fonts and colors, but if you want to hack away (as of the date of this blog post) you can mess around in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\sjogt3hc.qcl\daytona with ZERO WARRENTY EXPRESS OR IMPLIED. I went into there and edited the default.css file by removing all the comments and changing the background-color to black, the text to white, and adding a font-family choosing Consolas. If you do that, you'll likely need to uninstall/reinstall at some point when REAL customizations come. Again, alpha. But awesome.

"Whack" is a shorthand word for a slash (forward or otherwise) and the default hotkey is Ctrl+\, Ctrl+\. That's twice. so Ctrl WHACK WHACK. When you use the hotkey it will open the folder in the same folder as the currently selected project in the Solution Explorer.

If you want to change the hotkey to something else (like a more sensible Ctrl+~) you can do it in Tools | Options | Keyboard like this.

Changing the hotkey for the terminal

Then assign a new one by clicking in Press Shortcut Keys and typing "Ctrl+`" (which to me, is Ctrl ~ on my keyboard, without the shift)

Changing the hotkey for the terminal

By default the shell is PowerShell, but there's also places to support bash/Ubuntu, etc. For now, if you want bash, you can type C:\windows\sysnative\bash.exe in the terminal.

And just to freak you out, here's top running inside Visual Studio.

And just to freak you out, here's top running inside Visual Studio.

Enjoy! Install "WhackWhackTerminal" from here.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
August 03, 2017 1:42
Awesome! Gonna give it a shot :-)
August 03, 2017 2:02
Couldn't they just integrate ConEmu?
August 03, 2017 2:13
@Matthias, ConEmu requires that the user have ConEmu installed on their system. This extension doesn't require any external installations.
August 03, 2017 2:15
This looks pretty cool. I've been playing with cmder in quake console mode. Ctrl-` get's me my console (Powershell/bash/etc) no matter where I am and the quake-style pull down is just too freakin' sweet. I'll give this a whirl though.
August 03, 2017 3:13
@Daniel Griffen, there is a NuGet package ConEmu where you can embed it as simple control.
August 03, 2017 3:34
I've been using the ConEmu NuGet and it's very nice.
August 03, 2017 4:21
@Matthias, the other issue with simply embedding ConEmu is that my ability to integrate it and make it feel more like an actual part of visual studio is limited. With the technology stack I'm using I have almost full control of the terminal windows behavior and styling.
August 03, 2017 5:34
@Daniel: I guess that's a matter of personal preference, but I would prefer console settings to be the same across all terminals (meaning NO different styling and behavior). One thing that I really didn't like at the times when using cmd.exe and powershell.exe in plain mode.
August 03, 2017 5:59
Package manager console understands PowerShell commands. So why we need another terminal window for PowerShell?
August 03, 2017 7:42
@Arnab, the package manager console isn't a true terminal. It hosts a basic version of powershell that is incapable of executing any interactive applications or other shells. If you try and run something akin to vim or an interactive git rebase the shell will spew raw terminal escapes and likely hang. The situation is the same if you wanted to run cmd.exe or bash from it, it ends up hanging.
August 03, 2017 9:19
Thanks Daniel.
August 03, 2017 13:28
This is great :D

Added to my YAHFSICLW (pronounced YAF-SICK-LOO) list.

I find it complements ConEmu great, as i have set that up with some custom keyboard bindings to launch specific powershells (Skype for Business, Exchange, Azure AD and vanilla powershell), but generally i dont want that cruft in my IDE so have a much smaller "context" shift when im doing something dev related in VS than if i open my ops environment to do a dev task :D

One request @Daniel Griffen, will the github repo have more than a readme.md in it, as im the sort of guy who likes to read the code to work out if any bugs i encounter are intentional and are bugs in my expectations rather than the code, that and i prefer to :)
Tim
August 03, 2017 17:52
@Tim, hopefully the source code will be able to be released soon. The project was created during a company hackathon so I have to go though an approval process with legal before I can open source it.
August 03, 2017 17:58
Cmder for the win
August 04, 2017 18:36
Absolutely awesome!
(ConEmu was a bit overkill to me)
August 05, 2017 0:26
Nice, anyway I am slowly switching my workflow to JetBrains Rider, will leave VS for good in some time
August 06, 2017 11:05
Thanks Scott.

This blog post is welcome relief from the spam torrent of R language is awesome posts in other tech blogs. Enough of the niche of a niche speciality languages.
Ted
August 06, 2017 17:03
hi
very good article
thanks for published this post
August 07, 2017 0:05
very very good article

I really used

Thanks
August 07, 2017 10:08
I've been using the "Powershell Interactive" window that comes with the PowerShell Tools for VS2017 project. It's also a little bit rough around the edges, but it has very nice integration with VS2017 (including the colorscheme).
August 09, 2017 23:51
For those who do not mind having to install a Visual Studio 2017 extension (.vsix), I personally like Open Command Line by Mads Kristensen, which offers the ability to open either a full-featured PowerShell prompt at the current location or the older CMD prompt.

As has already been stated, you have to weigh the "it's simple and built-in" way vs. "needs a Visual Studio 2017 extension" way and decide which one you prefer.
August 10, 2017 2:02
I know the guys worked hard on this, but why not just use conemu with a hotkey which pops up?

What problem does it solve? ☺️
August 10, 2017 2:03
Daniel, it requires you to install the plugin so your still bringing in a binary.
August 10, 2017 3:30
For those of you trying to customize the fonts & colors as Scott described, you may find the WhackWhack default.css he mentioned buried down in your AppData folder instead. On my machine it was located in %LOCALAPPDATA%\Microsoft\VisualStudio\15.0_c9d477b0\Extensions\nejj4twn.omq\view
August 10, 2017 3:44
I think the difference in install location is due to them switching it from a per-machine to a per-user extension in the new version 0.2.4 that was released yesterday.
August 10, 2017 22:01
For all those asking about a ConEmu integration, here is a link to help you out: Start Here. I am excited to see people try something new and different. Maybe Whack Whack will be much better than a ConEmu integration, and I am happy to support people who have their own vision, even if it doesn't align with something else that already exists. Maybe Daniel's effort will spur some changes in ConEmu or maybe Whack Whack will fade away as an interesting experiment. That is what is I find so exciting about Open Source - if it solves your itch, great, use it. If it doesn't do it for you then you are free to move on and find a project that speaks to you, or maybe even start your own project.
August 11, 2017 1:44
Wow, there have been a lot of comments since I last checked this and quite a few questions to answer.

First I'll cover the question posed by Vince, this extension solves the integration issue that a ConEmu hotkey would have. By being part of VS I can offer features such as:

  • Opening to the current solution

  • Matching the VS theme

  • Click to goto error (work in progress)

  • Per-solution settings (planned work)


In regards to the speculation on the directory change from Chris Poe, yes, the 0.2.4 update changed how the extension was installed. Previously I had set it as a per-machine extension due to an API I was using requiring that my extension live in the Common7/IDE folder. With the 0.2.4 release I have removed my dependence on that API and so the extension can live in the AppData directory.
August 11, 2017 3:02
Just want to say that there is VisualStudio extension ConEmuIntegration by David Roller.
August 11, 2017 9:18
Cool feature! It would be better to use CMD directly in VS rather opening CMD prompt side by side with VS for debugging failed build scripts...:)

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.