简体   繁体   中英

F# - Visual Studio Debugger - Stepping over causes continue

I'm currently trying to learn F# and am having some problems with the Visual Studio 2015 debugger. Taking the following code as an example (I'm playing around with ASP.NET Web API):

[<Route("api/HomeApi/VideoCapture")>]
[<System.Web.Http.HttpGet>]
member this.VideoCapture() : HttpResponseMessage =
    let response = this.Request.CreateResponse()
    this.SetupCameraConsumers()
    this.SetupCapture()                        
    response.Content <- new PushStreamContent(this.Test())
    response

I have put a breakpoint at the first line in this method, stepping over the 'let' works fine, but when I try to step over the next line, VS debugger essentially continues to the end of the method without throwing any errors. Within the this.SetupCameraConsumers() call, I am simply adding some objects to a list and returns a 'unit'.

Has anyone come across anything like this before? If I can provide any more information please let me know - I've used the VS debugger for C# code and have never encountered anything like this.

Am I calling a method correctly? Is this allowed in F#?

Thanks!

Just for anyone else who may run into this issue, disabling the debugging option 'Just my code' allows me to step over the code. I'm not entirely sure why that should make a difference though. Thanks again for the helpful comments provided.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM