-
Notifications
You must be signed in to change notification settings - Fork 831
Description
With Debug builds, the F# 7 compiler (version 12.0.5.0) seems to add two attributes to all let-bound functions nested inside a class: CompilerGenerated and DebuggerNonUserCode. I believe that previously only CompilerGenerated was added. The inclusion of the DebuggerNonUserCode attribute seems to prevent VSCode and Visual Studio from setting breakpoints in these nested functions. Since the functions are clearly user code, I believe the attribute is being added incorrectly.
To reproduce, compile (dotnet build -c Debug) the attached project and use a disassembler (e.g. ilspy) to examine the code produced for the go function (nested in the Example class). It has the DebuggerNonUserCode attribute. If you then use Ionide (for example) to debug the project in VSCode, you cannot set a breakpoint in the nested go function. Expected behavior is that you can set a breakpoint in such nested functions.
FYI, I compiled (fsc -g) Program.fs with F# 11.4.2.0, and found that CompilerGenerated was present on the go function, but not DebuggerNonUserCode.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status