fsharp icon indicating copy to clipboard operation
fsharp copied to clipboard

multi-emit fsi debug -- watch variables don't work

Open KevinRansom opened this issue 3 years ago • 4 comments

In this session there are four sperate submissions, all sent in one go by using Alt+A select all then Debug in Fsi from the context menu. Note that locals and Autos are empty .. and the watch window claims x, y and z do not exist.

image

This happens because each section of code is separated by ;; and executed in a single submission.

Expected: All submitted code to be compiled and then executed.

Note: This behavior requires this PR: https://github.com/dotnet/fsharp/pull/14537

KevinRansom avatar Jan 09 '23 17:01 KevinRansom

Harrumpph!!! VS2019 did the same: image

KevinRansom avatar Jan 10 '23 19:01 KevinRansom

I tried to look what the Roslyn Expression Evaluator is receiving when debugging F#.

Debugging a net8 console app:

image
  1. Module instance Unoptimized

  2. Everything works fine.

Same code, but Debug in Interactive:

image
  1. Optimized, this is regardless of optimize flag in F# Tools settings.

  2. Next thing that happens is an assertion fail in MetadataDecoder.cs: image

majocha avatar Jan 05 '24 10:01 majocha

Hm, wondering why. I'll try not forgetting to look at it next week

vzarytovskii avatar Jan 05 '24 18:01 vzarytovskii

Any updates on this issue?

rgbav avatar Jun 05 '24 12:06 rgbav