Quick test and debug C# code in visual studio with CSharp interactive Window

in #csharp7 years ago

Some time you're coding some stuff on visual studio and you need that quick coding and test it but you don't want to do the full F5 stuff to just test some small function.

To save the day Microsoft added a feature called C# interactive Window provided by the new Roslyn compiler.

To show the this menu in Visual Studio 2017 go to View -> Other Windows -> C# Interactive:
Sem Título.jpg

You can then just type some code and hit Enter to start testing:
Capturar.PNG

If you want to debug you need to do just a little trick, you need to attach to the process InteractiveHost.exe and then if you have a custom class that you want to test code just follow the example below:
Capturar1.PNG

Happy coding :)

Coin Marketplace

STEEM 0.16
TRX 0.16
JST 0.030
BTC 57806.13
ETH 2453.64
USDT 1.00
SBD 2.36