Reproduction code:
private void IncrementCount()
{
string str= "ab-cd";
int num = 12;
}
Evaluate in watch:
str -> "ab-cd" [OK]
str.ToString() -> [FAIL]
num -> 12 [OK]
num.ToString() -> [FAIL]
Source of the problem:
Exception is thrown here:
|
DotnetObjectId.TryParse(rootObject?["objectId"]?.Value<string>(), out DotnetObjectId objectId); |
because we are not setting any ID for variable values here:
|
public async Task<JObject> CreateJObjectForVariableValue(MonoBinaryReader retDebuggerCmdReader, string name, bool isOwn, int typeIdFromAttribute, bool forDebuggerDisplayAttribute, CancellationToken token) |
so the rootObject looks e.g. like this:
{{
"type": "string",
"value": "ab-cd",
"description": "ab-cd"
}}
We need the variable ID to get the type of evaluated variable and see what methods it has to choose right method ID.
Reproduction code:
Evaluate in watch:
str -> "ab-cd" [OK]
str.ToString() -> [FAIL]
num -> 12 [OK]
num.ToString() -> [FAIL]
Source of the problem:
Exception is thrown here:
runtime/src/mono/wasm/debugger/BrowserDebugProxy/MemberReferenceResolver.cs
Line 390 in 976428f
because we are not setting any ID for variable values here:
runtime/src/mono/wasm/debugger/BrowserDebugProxy/MonoSDBHelper.cs
Line 1888 in 976428f
so the rootObject looks e.g. like this:
We need the variable ID to get the type of evaluated variable and see what methods it has to choose right method ID.