aboutsummaryrefslogtreecommitdiff
path: root/packages/bun-debug-adapter-protocol/src
diff options
context:
space:
mode:
authorGravatar Ashcon Partovi <ashcon@partovi.net> 2023-09-01 10:19:14 -0700
committerGravatar Ashcon Partovi <ashcon@partovi.net> 2023-09-01 10:19:14 -0700
commit2b421be06feb8024ed06e7aa85db14a1c37d7dbc (patch)
tree6a76dba894ddda731a15002071b8bba00edf131b /packages/bun-debug-adapter-protocol/src
parent1ff8155c2831b95b72fb9749b7e837df48893df6 (diff)
downloadbun-2b421be06feb8024ed06e7aa85db14a1c37d7dbc.tar.gz
bun-2b421be06feb8024ed06e7aa85db14a1c37d7dbc.tar.zst
bun-2b421be06feb8024ed06e7aa85db14a1c37d7dbc.zip
Fix breakpoint on entry for extension
Diffstat (limited to 'packages/bun-debug-adapter-protocol/src')
-rw-r--r--packages/bun-debug-adapter-protocol/src/debugger/adapter.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/bun-debug-adapter-protocol/src/debugger/adapter.ts b/packages/bun-debug-adapter-protocol/src/debugger/adapter.ts
index 94aa7e292..2f04185de 100644
--- a/packages/bun-debug-adapter-protocol/src/debugger/adapter.ts
+++ b/packages/bun-debug-adapter-protocol/src/debugger/adapter.ts
@@ -449,6 +449,7 @@ export class DebugAdapter extends EventEmitter<DebugAdapterEventMap> implements
env = {},
strictEnv = false,
watchMode = false,
+ stopOnEntry = false,
} = request;
if (!program) {
@@ -489,10 +490,8 @@ export class DebugAdapter extends EventEmitter<DebugAdapterEventMap> implements
signal.close();
});
- // Break on entry is always set so the debugger has a chance
- // to set breakpoints before the program starts. If `stopOnEntry`
- // was not set, then the debugger will auto-continue after the first pause.
- processEnv["BUN_INSPECT"] = `${url}?break=1`;
+ const query = stopOnEntry ? "break=1" : "wait=1";
+ processEnv["BUN_INSPECT"] = `${url}?${query}`;
processEnv["BUN_INSPECT_NOTIFY"] = signal.url;
// This is probably not correct, but it's the best we can do for now.