diff --git a/packages/bottender/src/cli/providers/sh/dev.ts b/packages/bottender/src/cli/providers/sh/dev.ts index 717514dc4..988aa9dac 100644 --- a/packages/bottender/src/cli/providers/sh/dev.ts +++ b/packages/bottender/src/cli/providers/sh/dev.ts @@ -13,6 +13,7 @@ const dev = async (ctx: CliContext): Promise => { const argv = getSubArgs(ctx.argv, { '--console': Boolean, '--port': Number, + '--inspect': String, // Aliases '-c': '--console', @@ -21,6 +22,7 @@ const dev = async (ctx: CliContext): Promise => { const isConsole = argv['--console'] || false; const port = argv['--port'] || process.env.PORT || 5000; + const inspectionUrl = argv['--inspect']; const config = getBottenderConfig(); @@ -36,6 +38,7 @@ const dev = async (ctx: CliContext): Promise => { // watch nodemon( [ + inspectionUrl ? `--inspect=${inspectionUrl} -- ` : '', isTypescript ? '--ext js,mjs,json,ts --ignore dist/ ' : '', '--exec "', isTypescript ? 'tsc && ' : '',