Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm][debugger] Trying to fix MT debugging experience. #90771

Closed
wants to merge 6 commits into from
Closed
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
7 changes: 7 additions & 0 deletions src/mono/wasm/runtime/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { VoidPtr, CharPtr } from "./types/emscripten";
import { mono_log_warn } from "./logging";
import { localHeapViewU8 } from "./memory";
import { utf8ToString } from "./strings";
import MonoWasmThreads from "consts:monoWasmThreads";

const commands_received: any = new Map<number, CommandResponse>();
commands_received.remove = function (key: number): CommandResponse { const value = this.get(key); this.delete(key); return value; };
let _call_function_res_cache: any = {};
Expand Down Expand Up @@ -149,6 +151,11 @@ export function mono_wasm_debugger_attached(): void {
if (runtimeHelpers.waitForDebugger == -1)
runtimeHelpers.waitForDebugger = 1;
cwraps.mono_wasm_set_is_debugger_attached(true);
if (MonoWasmThreads) {
const wasmMemory = Module.getMemory();
wasmMemory.grow(wasmMemory.buffer.byteLength >>> 16);
runtimeHelpers.updateMemoryViews();
}
}

export function mono_wasm_set_entrypoint_breakpoint(assembly_name: CharPtr, entrypoint_method_token: number): void {
Expand Down