oven-sh/bun · error · Error
Hit condition is not a number.
Error message
Hit condition is not a number.
What it means
Error "Hit condition is not a number." thrown in oven-sh/bun.
Source
Thrown at packages/bun-debug-adapter-protocol/src/debugger/adapter.ts:2478
data: logMessageToExpression(logMessage),
emulateUserGesture: true,
},
],
};
}
function hitConditionToIgnoreCount(hitCondition?: string): number | undefined {
if (!hitCondition) {
return undefined;
}
if (hitCondition.includes("<")) {
throw new Error("Hit condition with '<' is not supported, use '>' or '>=' instead.");
}
const count = parseInt(hitCondition.replace(/[^\d+]/g, ""));
if (isNaN(count)) {
throw new Error("Hit condition is not a number.");
}
if (hitCondition.includes(">") && !hitCondition.includes("=")) {
return Math.max(0, count);
}
return Math.max(0, count - 1);
}
function logMessageToExpression(logMessage?: string): string | undefined {
if (!logMessage) {
return undefined;
}
// Convert expressions from "hello {name}!" to "`hello ${name}!`"
return `console.log(\`${logMessage.replace(/\$?{/g, "${")}\`);`;
}
function completionToExpression(completion: string): { expression: string; hint?: string } {
const lastDot = completion.lastIndexOf(".");View on GitHub (pinned to 8c5296ac45)
When it happens
Trigger: Thrown at packages/bun-debug-adapter-protocol/src/debugger/adapter.ts:2478 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16).
Data as JSON: /api/errors/5d0f14b3e9576385.
Report an issue: GitHub.