Add debugging

This commit is contained in:
Anaïs Betts
2024-11-26 17:18:33 +01:00
parent 34a2843756
commit 7792070d81
2 changed files with 13 additions and 2 deletions

View File

@@ -6,6 +6,10 @@ import { fileURLToPath } from "url";
const __dirname = dirname(fileURLToPath(import.meta.url));
function delay(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
async function main() {
// Get command line arguments
const [, , command, ...mcpServerArgs] = process.argv;
@@ -64,7 +68,7 @@ async function main() {
try {
await Promise.any([server, client]);
} catch (e) {
if (!cancelled) throw e;
if (!cancelled || process.env.DEBUG) throw e;
}
return 0;