Skip to content
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