These are chat archives for Microsoft/visualfsharp

15th
Jun 2017
Onur Gumus
@OnurGumus
Jun 15 2017 03:00
@enricosada Great! By the way is there any work around regarding debugging unit tests with F#? I spoke to omnisharp guys.They say they only focus to C#.
I mean on VS Code of course.
Robin Munn
@rmunn
Jun 15 2017 04:02
@OnurGumus - What I've done when debugging Expecto tests is to copy the test case into the main function, commenting out the line that normally runs all the unit tests. Then after I build that, I'm able to step through the code in VS Code and see the values of local variables in VS Code's debugging pane. (When I try this in "normal" Expecto mode, where it's running multiple tests on multiple threads at once, VS Code appears to get confused about which thread I want to see, and I haven't been able to get it to work properly yet).
But that's on Mono; I haven't yet tried it on .Net Core.
mecusorin
@mecusorin_twitter
Jun 15 2017 08:01
@rmunn You are doing it wrong. Leave the code at it is, just mark your test as focused and debug it in isolation (https://github.com/haf/expecto#focusing-tests)
Robin Munn
@rmunn
Jun 15 2017 09:29
@mecusorin_twitter - Tried that, and VS Code was still confused. Maybe I should try it again, though, as that was a few months ago and whatever bugs I encountered may have been ironed out in the meantime.
I use focused tests all the time, BTW. Extremely handy feature, especially in combination with FsCheck properties.
mecusorin
@mecusorin_twitter
Jun 15 2017 10:25
glad you like it, exactly for this methodology I make it