Skip to content

Debug points failing to bind in body of "[ for x in xs -> body ]" #13504

@dsyme

Description

@dsyme

See #12432 (comment)

It's a good question - do you have a more specific repro of this problem please?

Just tested with the following demo:

[<EntryPoint>]
let main args =

    let test1 () =
        [ 3; 2; 1 ]
        |> List.map (fun x -> x + 10)
        |> List.sort

    let test2 = [
        for x in test1() do
            let xx = x * x
            printf "test"
            xx
        ]

    let test3 = [
        for x in test1() ->
            let xx = x * x
            printf "test"
            xx
        ]

    printf "The end"

AaWk1DzlQL

Notice that:

  • I can add breakpoints in both test2 and test3 before starting the debugger (F5)
  • When debugging, only the breakpoints in test2 stop the debugger
  • If I remove/re-add a breakpoint, it works in test2, it fails with the message "The breakpoint failed to bind." in test3

I'm using Visual Studio Community 2022 (64-bit) - Version 17.1.0, and it's a .NET 6.0 project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Debugstepping, debug points, stacks and moreBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.good first issuehelp wanted

    Type

    Projects

    Status

    New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions