Scott Hanselman

A proper terminal for Visual Studio

August 2, '17 Comments [38] 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
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb
Wednesday, 02 August 2017 21:42:11 UTC
Awesome! Gonna give it a shot :-)
Wednesday, 02 August 2017 22:02:57 UTC
Couldn't they just integrate ConEmu?
Matthias
Wednesday, 02 August 2017 22:13:34 UTC
@Matthias, ConEmu requires that the user have ConEmu installed on their system. This extension doesn't require any external installations.
Daniel Griffen
Wednesday, 02 August 2017 22:15:12 UTC
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.
Kevin Rich
Wednesday, 02 August 2017 23:13:45 UTC
@Daniel Griffen, there is a NuGet package ConEmu where you can embed it as simple control.
Matthias
Wednesday, 02 August 2017 23:34:20 UTC
I've been using the ConEmu NuGet and it's very nice.
Pablo
Thursday, 03 August 2017 00:21:45 UTC
@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.
Daniel Griffen
Thursday, 03 August 2017 01:34:00 UTC
@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.
Matthias
Thursday, 03 August 2017 01:59:45 UTC
Package manager console understands PowerShell commands. So why we need another terminal window for PowerShell?
Thursday, 03 August 2017 03:42:08 UTC
@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.
Daniel Griffen
Thursday, 03 August 2017 05:16:59 UTC
Visual Studio 2017 Command Line gonna be hard to master for all windows/net devs as there is no buttons to click :)
Lesha
Thursday, 03 August 2017 05:19:29 UTC
Thanks Daniel.
Thursday, 03 August 2017 09:28:56 UTC
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
Thursday, 03 August 2017 13:52:01 UTC
@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.
Daniel Griffen
Thursday, 03 August 2017 13:58:42 UTC
Cmder for the win
Friday, 04 August 2017 14:36:57 UTC
Absolutely awesome!
(ConEmu was a bit overkill to me)
Marcel
Friday, 04 August 2017 20:26:09 UTC
Nice, anyway I am slowly switching my workflow to JetBrains Rider, will leave VS for good in some time
Janek
Sunday, 06 August 2017 07:05:58 UTC
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
Sunday, 06 August 2017 13:02:16 UTC
hi scot
thanks for sharing this post
Sunday, 06 August 2017 13:03:48 UTC
hi
very good article
thanks for published this post
Sunday, 06 August 2017 20:05:25 UTC
very very good article

I really used

Thanks
Monday, 07 August 2017 06:08:17 UTC
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).
Tuesday, 08 August 2017 19:08:16 UTC
Cool!!
Satyabrata Mohapatra
Wednesday, 09 August 2017 12:23:18 UTC
Thanks For Sharing The Valuable Post !!
Wednesday, 09 August 2017 19:51:20 UTC
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.
Fred Morrison
Wednesday, 09 August 2017 22:02:28 UTC
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? ☺️
Vince
Wednesday, 09 August 2017 22:03:44 UTC
Daniel, it requires you to install the plugin so your still bringing in a binary.
Vince
Wednesday, 09 August 2017 23:30:21 UTC
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
Chris Poe
Wednesday, 09 August 2017 23:44:41 UTC
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.
Chris Poe
Thursday, 10 August 2017 08:18:25 UTC
hi scott
thanks for this post
very good
Thursday, 10 August 2017 18:01:46 UTC
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.
Thursday, 10 August 2017 18:01:47 UTC
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.
Thursday, 10 August 2017 21:44:27 UTC
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.
Daniel Griffen
Thursday, 10 August 2017 23:02:52 UTC
Just want to say that there is VisualStudio extension ConEmuIntegration by David Roller.
Friday, 11 August 2017 01:31:29 UTC
THis is just a test to see what captcha you use. THanks.
Mr Test
Friday, 11 August 2017 05:18:44 UTC
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...:)
Friday, 11 August 2017 08:01:46 UTC
Hi Scott,
Thanks for sharing new feature of Vs.
Sunday, 13 August 2017 06:08:15 UTC
I Really Appreciate Your Experience You Sharing With Us.
Comments are closed.

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