Adding Try .NET to VSCode launch.json

Jim Bennett | Jun 11, 2019

I’ve been playing a lot with Try .NET. I even blogged about it recently - [jimbobbennett.io/trying-out-try-net](/blogs/trying-out-try-net/).

One thing that was beginning to annoy me slightly was having to constantly launch the terminal and type dotnet try to test out what I was working in. My life would be infinitely improved (not really), if I could run it via F5 or the debug menu/tab instead of the terminal.

Turns out its pretty easy to do - just add a new entry to your launch.json file either directly from the file in the .vscode folder, or adding a configuration using the debug menu.

Add this to it:

{
    "name": "Try .NET",
    "type": "coreclr",
    "request": "launch",
    "program": "dotnet",
    "args":"try"
}

That’s all you need. Now you can run dotnet try just by pressing F5.