Breakpoints on pipeline stages by dsyme · Pull Request #11957 · dotnet/fsharp ·...
source link: https://github.com/dotnet/fsharp/pull/11957
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
This adds breakpoints and stepping on stages in F# forward piping in debug code.
Spec (debug codegen only)
Breakpoint validity
For expr |> f1 |> f2 ... |> fLast
, a breakpoint is valid on the expression that is an input to a pipeline, and any "stage" of a pipeline.
Similarly, for (expr1, expr2) ||> f1 |> f2 ... |> fLast
and (expr1, expr2, expr3) |||> f1 |> f2 ... |> fLast` , a breakpoint is valid on each of the input expressions, and any "stage" of a pipeline.
Sequence point emit
A corresponding sequence point is emitted in .NET IL before the evaluation of expr
and before applying each of f1
, f2
etc.
Locals
-
A local value
Pipe #m input #n @ line
is shown within f1, f2, f3, ...for the corresponding value ofexpr
. The pipe number is the occurrence of piping within the method. Then
it the input number (elided if only one input). Theline
is the line number where the input expression occurs. -
A local value
Pipe #m stage 1 @ line
is shown within f2, f3, ... for the corresponding value ofexpr |> f1
-
A local value
Pipe #m stage 2 @ line
is shown within f3, ... for the corresponding value ofexpr |> f1 |> f2
The names of the locals are emitted in IL code and are not localized (as that would make compiler output dependent on localization).
Sample screen capture below (stepping) - the local values names differ slightly from the above spec
a.Debugging.-.Microsoft.Visual.Studio.Administrator.2021-08-12.15-17-03.mp4
And with breakpoints:
a.-.Microsoft.Visual.Studio.Administrator.2021-08-12.15-54-23.mp4
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK