dotnet / dotnet/fsharp

Debugger does not enable watch for mutable fields

Open
#14,623 0 comments 0 reactions 0 assignees View on GitHub
Area-Debug Bug Impact-Medium
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 22h
Merged PRs (30d)
144

Description

Compile an exe containing this:

````
let internal x = 10

let mutable internal y = x * 10

let mutable z = y + x

let a = 10

let printIt() =
//x <- x + 1
printfn $"{x} + {y} + {z}"

printIt()

printIt()
printIt()
printIt()
printIt()
printIt()
````

Step through it under the debugger.

Add x, y and z to the watch window:
observe y and z state: error CS0`103: the name 'y' does not exist in the current context.

![image](https://user-images.githubusercontent.com/5175830/213029506-f893540d-1d2b-40b6-86c2-feee35c08b8d.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.