diff options
author | Larry Ewing <lewing@microsoft.com> | 2020-02-04 03:50:13 +0300 |
---|---|---|
committer | Larry Ewing <lewing@microsoft.com> | 2020-02-06 05:37:46 +0300 |
commit | dd151fea350a7eba35629539a719b4d348039bab (patch) | |
tree | 3489265bfa69e18fab308aa087af858e38feeb67 /sdks | |
parent | 32826eb4183875de14b722eb47bf5894f02806b9 (diff) |
[wasm][debugger] Silence some logging and extract the null case
Diffstat (limited to 'sdks')
-rw-r--r-- | sdks/wasm/Mono.WebAssembly.DebuggerProxy/MonoProxy.cs | 5 | ||||
-rw-r--r-- | sdks/wasm/src/library_mono.js | 91 |
2 files changed, 46 insertions, 50 deletions
diff --git a/sdks/wasm/Mono.WebAssembly.DebuggerProxy/MonoProxy.cs b/sdks/wasm/Mono.WebAssembly.DebuggerProxy/MonoProxy.cs index f1cf922316e..dcbe1957f10 100644 --- a/sdks/wasm/Mono.WebAssembly.DebuggerProxy/MonoProxy.cs +++ b/sdks/wasm/Mono.WebAssembly.DebuggerProxy/MonoProxy.cs @@ -148,7 +148,8 @@ namespace WebAssembly.Net.Debugging { break; } case "Debugger.enabled": { - await LoadStore (new SessionId { sessionId = args? ["sessionId"]?.Value<string> () }, token); + if (store == null) + await LoadStore (new SessionId { sessionId = args? ["sessionId"]?.Value<string> () }, token); break; } } @@ -193,7 +194,7 @@ namespace WebAssembly.Net.Debugging { } case "Debugger.setBreakpointByUrl": { - Log ("info", $"BP req {args}"); + Log ("verbose", $"BP req {args}"); var bp_req = BreakPointRequest.Parse (args, store); if (bp_req != null) { await SetBreakPoint (id, bp_req, token); diff --git a/sdks/wasm/src/library_mono.js b/sdks/wasm/src/library_mono.js index 50f4b7795b2..11701d50d23 100644 --- a/sdks/wasm/src/library_mono.js +++ b/sdks/wasm/src/library_mono.js @@ -295,64 +295,59 @@ var MonoSupportLib = { mono_wasm_add_string_var: function(var_value) { if (var_value == 0) { - MONO.var_info.push({ - value: { - type: "object", - subtype: "null" - } - }); - } else { - MONO.var_info.push({ - value: { - type: "string", - value: Module.UTF8ToString (var_value), - } - }); - } + MONO.mono_wasm_add_null_var ("string"); + return; + } + + MONO.var_info.push({ + value: { + type: "string", + value: Module.UTF8ToString (var_value), + } + }); + }, + + mono_wasm_add_null_var: function(className) + { + MONO.var_info.push ({value: { + type: "object", + className: Module.UTF8ToString (className), + description: Module.UTF8ToString (className), + subtype: "null" + }}); }, mono_wasm_add_obj_var: function(className, objectId) { if (objectId == 0) { - MONO.var_info.push({ - value: { - type: "object", - className: Module.UTF8ToString (className), - description: Module.UTF8ToString (className), - subtype: "null" - } - }); - } else { - MONO.var_info.push({ - value: { - type: "object", - className: Module.UTF8ToString (className), - description: Module.UTF8ToString (className), - objectId: "dotnet:object:"+ objectId, - } - }); + MONO.mono_wasm_add_null_var (className); + return; } + + MONO.var_info.push({ + value: { + type: "object", + className: Module.UTF8ToString (className), + description: Module.UTF8ToString (className), + objectId: "dotnet:object:"+ objectId, + } + }); }, mono_wasm_add_array_var: function(className, objectId) { if (objectId == 0) { - MONO.var_info.push({ - value: { - type: "array", - className: Module.UTF8ToString (className), - description: Module.UTF8ToString (className), - subtype: "null" - } - }); - } else { - MONO.var_info.push({ - value: { - type: "array", - className: Module.UTF8ToString (className), - description: Module.UTF8ToString (className), - objectId: "dotnet:array:"+ objectId, - } - }); + MONO.mono_wasm_add_null_var (className); + return; } + + MONO.var_info.push({ + value: { + type: "object", + subtype: "array", + className: Module.UTF8ToString (className), + description: Module.UTF8ToString (className), + objectId: "dotnet:array:"+ objectId, + } + }); }, mono_wasm_add_frame: function(il, method, name) { |