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

DebuggerStepThrough attribute is not respected for async, task and other CEs #3359

Open
vasily-kirichenko opened this issue Jul 21, 2017 · 3 comments
Labels
Area-Debug stepping, debug points, stacks and more Feature Request
Milestone

Comments

@vasily-kirichenko
Copy link
Contributor

I find myself here stepping with F10:

image

which should never happen.

@dsyme
Copy link
Contributor

dsyme commented Jul 21, 2017

The are (many) inner lambdas. Currently it is not possible to attribute these

Should it be automatically propagated do you think?

@vasily-kirichenko
Copy link
Contributor Author

I expect the debugger to not step into Bind even by pressing F11, as if it were defined in a referenced assembly with no source code available. As MSDN reads:

This attribute is provided for use by source code debuggers; the common language runtime is not affected by it. For example, the Visual Studio debugger does not stop in a method that is marked with this attribute even if a breakpoint is set in the method.

Maybe I don't understand something?

@dsyme
Copy link
Contributor

dsyme commented Jul 21, 2017

@vasily-kirichenko As so often in F#, the attribute applies to the compiled form of Bind, not the source form. The compiled form include multiple lambdas, whose Invoke methods are not marked with the attribute. So you are stepping into the Invoke method of one of these lamdas.

Right now, it isn't possible to reason about this without thinking about the compiled form

The only thought I have is that we could automatically propagate the attribute into those invoke methods.
We should find out what C# does with inner lambdas though

@dsyme dsyme added the Area-Debug stepping, debug points, stacks and more label Aug 25, 2017
@cartermp cartermp reopened this Jan 28, 2018
@cartermp cartermp added this to the Unknown milestone Aug 25, 2018
@dsyme dsyme changed the title DebuggerStepThrough attribute is not respected DebuggerStepThrough attribute is not respected for async, task and other CEs Aug 23, 2021
@vzarytovskii vzarytovskii moved this to Not Planned in F# Compiler and Tooling Jun 17, 2022
@vzarytovskii vzarytovskii reopened this Jan 4, 2024
@github-project-automation github-project-automation bot moved this from Done to In Progress in F# Compiler and Tooling Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Debug stepping, debug points, stacks and more Feature Request
Projects
Archived in project
Development

No branches or pull requests

5 participants