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
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 @@ -5589,6 +5589,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
19 changes: 19 additions & 0 deletions src/mono/wasm/debugger/DebuggerTestSuite/MiscTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1188,5 +1188,24 @@ public async Task TestDebugUsingMultiThreadedRuntime()
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", 1664, 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))
);
}
);
}
}
}
9 changes: 9 additions & 0 deletions src/mono/wasm/debugger/tests/debugger-test/debugger-test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1656,3 +1656,12 @@ public void CallMethod()

public int myField;
}

public class SpanByte
{
public static void Run()
{
System.Span<byte> span = new ();
System.Diagnostics.Debugger.Break();
}
}