Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/mono/browser/debugger/DebuggerTestSuite/MiscTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1200,5 +1200,24 @@ public async Task TestDebugUsingMultiThreadedRuntime(int _attempt)
Assert.Equal(locals[1]["value"]["type"], "number");
Assert.Equal(locals[1]["name"], "currentThread");
}

[Fact]
public async Task InspectSpanByte()
{
var expression = $"{{ invoke_static_method('[debugger-test] SpanByte:Run'); }}";

await EvaluateAndCheck(
"window.setTimeout(function() {" + expression + "; }, 1);",
"dotnet://debugger-test.dll/debugger-test.cs", 1684, 8,
"SpanByte.Run",
wait_for_event_fn: async (pause_location) =>
{
var id = pause_location["callFrames"][0]["callFrameId"].Value<string>();
await EvaluateOnCallFrameAndCheck(id,
("span", TObject("System.Span<byte>", null))
);
}
);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1675,4 +1675,13 @@ public static void Run()
BreakpointTestsClass bpTest = new();
}
}
}

public class SpanByte
{
public static void Run()
{
System.Span<byte> span = new ();
System.Diagnostics.Debugger.Break();
}
}
1 change: 1 addition & 0 deletions src/mono/mono/component/debugger-agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -5581,6 +5581,7 @@ decode_value_compute_size (MonoType *t, int type, MonoDomain *domain, guint8 *bu
if (type != t->type && !MONO_TYPE_IS_REFERENCE (t) &&
!(t->type == MONO_TYPE_I && type == MONO_TYPE_VALUETYPE) &&
!(type == VALUE_TYPE_ID_FIXED_ARRAY) &&
!(type == MDBGPROT_VALUE_TYPE_ID_NULL) &&
!(t->type == MONO_TYPE_U && type == MONO_TYPE_VALUETYPE) &&
!(t->type == MONO_TYPE_PTR && type == MONO_TYPE_I8) &&
!(t->type == MONO_TYPE_FNPTR && type == MONO_TYPE_I8) &&
Expand Down