Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't seem to work in Visual Studio 2012 express - Exception Options? #23

Closed
relentless opened this issue Jan 9, 2014 · 8 comments
Closed

Comments

@relentless
Copy link

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).

@ChrisMarinos
Copy link
Owner

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.

@GingerGeek
Copy link

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.

@CalMlynarczyk
Copy link
Contributor

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.

@M0ns1gn0r
Copy link

Another approach would be to Start without Debugging (Ctrl + F5).

@dsyme
Copy link
Collaborator

dsyme commented Jun 7, 2017

Closing as this is just the way things work, see above for how to change your exception settings

@dsyme dsyme closed this as completed Jun 7, 2017
@bugQ
Copy link

bugQ commented May 10, 2018

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.

@ChrisMarinos
Copy link
Owner

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. :-)

@bugQ
Copy link

bugQ commented May 10, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants