Open cateyes99 opened 7 years ago
This is likely by design. IIRC, Visual Studio does the same thing. However, VS also provides a "Dynamic View" that can be expanded for dynamic types.
@DustinCampbell
When debugging in VS2017, Before patch.ApplyTo(a);
it shows
After patch.ApplyTo(a);
it shows the below. VS2017 does the same thing for showing what in the Value column. But in the Type column, it shows dynamic {Newtonsoft.Json.Linq.JObject}
which tells the real type. But what shows in VSCode is only [dynamic]
. So maybe Omnisharp can take the same approach in VS2017.
Environment data
dotnet --info
output:VS Code version
: 1.12.1C# Extension version
: 1.8.1Steps to reproduce
Create the following code as
public class A { public string Name {get; set;} public dynamic Dyn {get; set;} }
Observe the variable
a
in the debugger'sLocals
window. Beforepatch.ApplyTo(a);
it shows the type ofa.Dyn
as{System.Dynamic.ExpandoObject}
which is nice as I wanna know the real type here.After
patch.ApplyTo(a);
, the a.Dyn's value has been replaced by a{Newtonsoft.Json.Linq.JObject}
which is created byMicrosoft.AspNetCore.JsonPatch.JsonPatchDocument<TModel>
, it doesn't show the type ofa.Dyn
instead shows the value of it, which isn't that convenient as the type info is very important.