diff --git a/packages/aws-cdk/lib/cli.ts b/packages/aws-cdk/lib/cli.ts index 5574f487a496c..0871e2a42814c 100644 --- a/packages/aws-cdk/lib/cli.ts +++ b/packages/aws-cdk/lib/cli.ts @@ -315,16 +315,17 @@ if (!process.stdout.isTTY) { export async function exec(args: string[], synthesizer?: Synthesizer): Promise { const argv = await parseCommandLineArguments(args); + if (argv.verbose) { + setLogLevel(argv.verbose); + } + if (argv.debug) { enableSourceMapSupport(); } - if (argv.verbose) { - setLogLevel(argv.verbose); - - if (argv.verbose > 2) { - enableTracing(true); - } + // Debug should always imply tracing + if (argv.debug || argv.verbose > 2) { + enableTracing(true); } if (argv.ci) {