buffer_add_string (buf, f->name);
buffer_add_typeid (buf, domain, mono_class_from_mono_type_internal (f->type));
buffer_add_int (buf, f->type->attrs);
+ if (CHECK_PROTOCOL_VERSION(2, 61))
+ buffer_add_int(buf, mono_class_field_is_special_static(f));
i ++;
}
g_assert (i == nfields);
string fieldNameStr = retDebuggerCmdReader.ReadString();
int typeId = retDebuggerCmdReader.ReadInt32(); //typeId
retDebuggerCmdReader.ReadInt32(); //attrs
+ int isSpecialStatic = retDebuggerCmdReader.ReadInt32(); //is_special_static
+ if (isSpecialStatic == 1)
+ continue;
if (fieldNameStr.Contains("k__BackingField"))
{
fieldNameStr = fieldNameStr.Replace("k__BackingField", "");
{
await EvaluateAndCheck(
"window.setTimeout(function() { invoke_static_method_async('[debugger-test] UserBreak:BreakOnDebuggerBreakCommand'); }, 1);",
- "dotnet://debugger-test.dll/debugger-test2.cs", 56, 4,
+ "dotnet://debugger-test.dll/debugger-test2.cs", 58, 4,
"BreakOnDebuggerBreakCommand");
}
{
var pause_location = await EvaluateAndCheck(
"window.setTimeout(function() { invoke_static_method('[debugger-test] TestChild:TestWatchWithInheritance'); }, 1);",
- "dotnet://debugger-test.dll/debugger-test2.cs", 83, 4,
+ "dotnet://debugger-test.dll/debugger-test2.cs", 122, 4,
"TestWatchWithInheritance");
var frame_id = pause_location["callFrames"][0]["callFrameId"].Value<string>();
var frame_locals = await GetProperties(frame_id);
[Fact]
public async Task InspectLocalsTypesAtBreakpointSite() =>
await CheckInspectLocalsAtBreakpointSite(
- "dotnet://debugger-test.dll/debugger-test2.cs", 48, 8, "Types",
+ "dotnet://debugger-test.dll/debugger-test2.cs", 50, 8, "Types",
"window.setTimeout(function() { invoke_static_method (\"[debugger-test] Fancy:Types\")(); }, 1);",
use_cfo: false,
test_fn: (locals) =>
Assert.True(source.IsOk);
}
+ [Fact]
+ public async Task InspectTaskAtLocals() => await CheckInspectLocalsAtBreakpointSite(
+ "InspectTask",
+ "RunInspectTask",
+ 7,
+ "<RunInspectTask>b__0" ,
+ $"window.setTimeout(function() {{ invoke_static_method_async('[debugger-test] InspectTask:RunInspectTask'); }}, 1);",
+ wait_for_event_fn: async (pause_location) =>
+ {
+ var locals = await GetProperties(pause_location["callFrames"][0]["callFrameId"].Value<string>());
+
+ var t_props = await GetObjectOnLocals(locals, "t");
+ await CheckProps(t_props, new
+ {
+ s_taskIdCounter = TNumber(0),
+ Status = TGetter("Status")
+ }, "t_props", num_fields: 53);
+ });
+
//TODO add tests covering basic stepping behavior as step in/out/over
}
}
<WasmExtraFilesToDeploy Include="debugger-driver.html" />
<WasmExtraFilesToDeploy Include="other.js" />
<WasmExtraFilesToDeploy Include="runtime-debugger.js" />
+ <WasmExtraFilesToDeploy Include="weather.json" />
<!-- We want to bundle these assemblies, so build them first -->
<ProjectReference Include="..\lazy-debugger-test\lazy-debugger-test.csproj" Private="true"/>
using System;
using System.Diagnostics;
+using System.Net.Http.Json;
+
public class Misc
{ //Only append content to this class as the test suite depends on line info
public static int CreateObject(int foo, int bar)
}
}
+public class WeatherForecast
+{
+ public DateTime Date { get; set; }
+
+ public int TemperatureC { get; set; }
+
+ public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
+
+ public string Summary { get; set; }
+}
+
+public class InspectTask
+{
+ public static async System.Threading.Tasks.Task RunInspectTask()
+ {
+ WeatherForecast[] forecasts = null;
+ var httpClient = new System.Net.Http.HttpClient();
+ var getJsonTask = httpClient.GetFromJsonAsync<WeatherForecast[]>("http://localhost:9400/weather.json");
+ try
+ {
+ await getJsonTask.ContinueWith(t =>
+ {
+ if (t.IsCompletedSuccessfully)
+ forecasts = t.Result;
+
+ if (t.IsFaulted)
+ throw t.Exception!;
+ });
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine($"error {ex}");
+ return;
+ }
+ }
+}
+
public class TestParent2
{
public int k = 30;
--- /dev/null
+[
+ {
+ "dateFormatted": "06/05/2018",
+ "temperatureC": 1,
+ "summary": "Freezing",
+ "temperatureF": 33
+ },
+ {
+ "dateFormatted": "07/05/2018",
+ "temperatureC": 14,
+ "summary": "Bracing",
+ "temperatureF": 57
+ },
+ {
+ "dateFormatted": "08/05/2018",
+ "temperatureC": -13,
+ "summary": "Freezing",
+ "temperatureF": 9
+ },
+ {
+ "dateFormatted": "09/05/2018",
+ "temperatureC": -16,
+ "summary": "Balmy",
+ "temperatureF": 4
+ },
+ {
+ "dateFormatted": "10/05/2018",
+ "temperatureC": -2,
+ "summary": "Chilly",
+ "temperatureF": 29
+ }
+]