debugging – How to examine scoped data service objects in the Immediate Window of a WASM Visual Studio app?


My WASM app developed with VS Community 2022 v 17.10.1 creates a scoped data Service (via builder.Services.AddScoped() in Program.cs in which MyData is a class containing only properties).

At breakpoints, I can hover the cursor over references to MyData to see the property values, but if I enter “MyData;” in the Immediate Window, I get “Uncaught Cannot evaluate ‘(MyData;”. I have no idea what the “(” nor single “‘” are about. I’ve also tried entering “MyData);” but get the same message showing “‘(MyData);”. Finally, I don’t get anything (sometimes) if I hover the cursor over a reference to one of MyData’s properties. I can only examine all of MyData via hover. This is a real productivity hit. Thanks for any help you can provide.

Leave a Reply

Your email address will not be published. Required fields are marked *