mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-15 12:55:51 +00:00
feat: 简化 debug 方式
This commit is contained in:
2
scripts/dev-debug.ts
Normal file
2
scripts/dev-debug.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
process.env.BUN_INSPECT="localhost:8888/2dc3gzl5xot"
|
||||
await import("./dev")
|
||||
@@ -26,8 +26,13 @@ const envFeatures = Object.entries(process.env)
|
||||
const allFeatures = [...new Set([...DEFAULT_FEATURES, ...envFeatures])];
|
||||
const featureArgs = allFeatures.flatMap((name) => ["--feature", name]);
|
||||
|
||||
// If BUN_INSPECT is set, pass --inspect-wait to the child process
|
||||
const inspectArgs = process.env.BUN_INSPECT
|
||||
? ["--inspect-wait=" + process.env.BUN_INSPECT]
|
||||
: [];
|
||||
|
||||
const result = Bun.spawnSync(
|
||||
["bun", "run", ...defineArgs, ...featureArgs, "src/entrypoints/cli.tsx", ...process.argv.slice(2)],
|
||||
["bun", ...inspectArgs, "run", ...defineArgs, ...featureArgs, "src/entrypoints/cli.tsx", ...process.argv.slice(2)],
|
||||
{ stdio: ["inherit", "inherit", "inherit"] },
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user