question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Variable in scope is not visible after a bang!-operation in CE

See original GitHub issue

Repro.zip

At least in the async CE, after a monadic operation (let!/do!/match! etc.), variables in the debugger suddenly seem to go out of scope:

module Program =

  let f x =
    async {
      do! async.Return ()
      return 1
    }

  [<EntryPoint>]
  let main _argv =
    f 0 |> Async.RunSynchronously |> printfn "%A"
    0

image

image1

(Screenshots from Rider. Originally reported there, but was redirected here.)

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
vzarytovskiicommented, Mar 20, 2023

Any chance to have a look at this? It’s making debugging rather cumbersome, since I have to insert spurious code everywhere just to be able to break on and inspect the variables I’m after.

It’s not as trivial unfortunately, and will likely require some substantial changes. We’ll see when we can plan it.

1reaction
cmeerencommented, Jun 14, 2022

MSBuild 17.0, SDK 6.0.300.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A variable is cannot be found in scope
1 Answer. I found that: It's not allowed to jump from function to function directly, it appropriate needs to set var or let...
Read more >
Variable Scope | Fix error: 'yourVariable' was not declared ...
Are you getting the error: 'YourVariable' was not declared in this scope? What is variable scope anyway? Arduino not declared in variable scope...
Read more >
Understanding scope and visibility (VBA)
Procedure-level scope​​ A variable or constant defined within a procedure is not visible outside that procedure. Only the procedure that contains ...
Read more >
Know the Scope of Local Variables
When a variable is declared in a method of a C# program, its scope is pre-defined and its visibility is defined for the...
Read more >
Variable Scope - Alpha Anywhere Documentation
A Session variable is visible to a form and all sub-forms and sub-browses in that form. A Layout variable is only visible on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found