Doesn't seem to work in Visual Studio 2012 express - Exception Options?
relentless opened this issue ยท 8 comments
Hi, I was using your very useful koans in a session last night, but someone using VS2012 Express (Web I think) couldn't get it working. I think the problem was related to the fact that that version of VS doesn't have the Debug -> Exceptions menu item, so we couldn't change the settings as described in the readme.
Apologies if I'm wrong, we didn't have Internet at the time so I couldn't really investigate it.
As the koans are quite often used to introduce people to F# (by me at least!), it would be great if they worked with express editions. (And something in the readme about it would be good too, as it takes a bit of googling to find out which VS Express you can even use F# with).
Yeah, I ran into this problem once before during a workshop with the koans. I don't think we found a good workaround for it at the time, but doing some googling, it appears that this may be a workaround.
http://msdn.microsoft.com/en-us/library/038tzxdw.aspx
I can't verify that it works right now, but if it does, I'm happy to update the readme with the info.
Hi, I was the guy who couldn't get it to work, I just can't seem to find that Debug -> Exceptions thing even in Expert Settings Mode.
If I remember correctly, they removed the ability to filter exception types in the express editions (starting with VS 2012). See this for possible fixes if that isn't the case.
You can also navigate to the application output directory (ex. FSharpKoans/bin/Debug) and run FSharpKoans.exe outside of Visual Studio.
Another approach would be to Start without Debugging (Ctrl + F5).
Closing as this is just the way things work, see above for how to change your exception settings
this is so unsatisfactory !!! ugh
just so others can see, the most current fix is to uncheck "Enable Just My Code" in Debugging options, but this is a global setting and is usually only recommended to turn off when debugging your dependencies. also, similarly to running without debugging, it doesn't break on __
"holes", requiring you to read the console output to find the error. altogether nonideal.
i know this is a problem with NUnit's interaction with Visual Studio, not with this repo, so excuse my frustration.
Sorry about that. As you said, this is just a result of the way the NUnit exception handling works with VS, so there isn't much that we can do. Hopefully you still learn something from the koans despite the inconvenience of referencing the console output. :-)
actually, this frustration runs so deep that I have re-implemented the AssertThrows
helper:
let AssertThrows<'a when 'a :> exn> action = try action() with e -> Assert.IsInstanceOf<'a>(e)
doing so ensures that the closure is run inside "user code". I'm not necessarily suggesting that this change be made here, but at least wanted to share this as an option for others.