Closed 0x53A closed 6 years ago
Turning on this setting
makes it more usable
However
@KevinRansom @TIHan We should think about providing "modern" (whatever it means) visualizers for lists, dicts and maps.
Lists, arrays, and maps use the same visualization behavior in the legacy EE thanks to @saul:
Is the suggestion that the underlying IDictionary
's keys and values be ToArray
'd? Today it shows it as the underlying IEnumerable, which you must enumerate in the DataTip.
Note: I am using the latest VS preview WITHOUT nightlies, so some of this may already be fixed.
ah, right, there was that switch ... If I enable the legacy EE, I get empty "Autos" / "Locals", and trying to manually add something to the watch:
If I also enable managed compatibility mode, then I get
(Which is probably because this is a new-sdk console app, so portable-pdb).
IF I then also disable portable-pdb I see this:
So there is no way to drill into Keys
, but I can drill into Values
.
The fact alone that I can't actually see the keys makes this really useless.
Compare this with C#:
I see the total count at the top, instead of the type which I don't care about.
If I open it, I see ToString for each key/value combination, and can drill down.
Looking at the code, we just don't have a debug visualizer for the result of 'dict'. Will take a look at adding this an put in a PR.
Should I create a separate issue for the following, or is this already on your radar?
1) Legacy EE only works in combination with Managed Compat Mode (otherwise I get "Internal error in the expression evaluator") 2) Managed Compat Mode does NOT work in combination with portable-pdb
==> portable-pdb and sane debugging are exclusive
The legacy EE is very unlikely to change in the future, nor do I suspect we'll be doing much work in portable PDB generation to ensure it works with an EE that will be discontinued. With @saul's PR (if you can confirm it works), what else is missing such that it's "sane"?
The Legacy EE is deprecated. We need to build an F# EE it's a piece of work, and is on the backlog. In the meantime we leverage C#'s EE.
Ah, apologies.
I was under the mistaken impression that the List
, Set
, Map
(and so on) visualizers also only worked with legacy EE.
After actually testing it, it works really good with new EE and portable-pdb. 👍
The only really minor thing I noticed is that it writes the type of the key as System.__Canon {string}
instead of just string
.