GetPossibleBreakpointsEvent

Signed-off-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
Delan Azabani 2025-08-09 20:18:30 +08:00
parent 21d7683614
commit db4534a807
8 changed files with 71 additions and 10 deletions

View file

@ -5,6 +5,7 @@ if ("dbg" in this) {
const dbg = new Debugger;
const debuggeesToPipelineIds = new Map;
const debuggeesToWorkerIds = new Map;
const sourceIdsToScripts = new Map;
dbg.uncaughtExceptionHook = function(error) {
console.error(`[debugger] Uncaught exception at ${error.fileName}:${error.lineNumber}:${error.columnNumber}: ${error.name}: ${error.message}`);
@ -12,6 +13,7 @@ dbg.uncaughtExceptionHook = function(error) {
dbg.onNewScript = function(script, /* undefined; seems to be `script.global` now */ global) {
// TODO: handle wasm (`script.source.introductionType == wasm`)
sourceIdsToScripts.set(script.source.id, script);
notifyNewSource({
pipelineId: debuggeesToPipelineIds.get(script.global),
workerId: debuggeesToWorkerIds.get(script.global),