Skip to content

Commit ff93f08

Browse files
committed
SAM debugconfig: adjust "Prepare to run" message
1 parent bc0c45b commit ff93f08

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

package.nls.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@
248248
"AWS.output.sam.local.attach.failure": "Unable to attach Debugger. Check the Terminal tab for output. If it took longer than expected to successfully start, you may still attach to it.",
249249
"AWS.output.sam.local.attach.retry.limit.exceeded": "Retry limit reached while trying to attach the debugger.",
250250
"AWS.output.sam.local.error": "Error: {0}",
251-
"AWS.output.sam.local.start": "Preparing to run {0} locally...",
251+
"AWS.output.sam.local.startRun": "Preparing to run '{0}' locally...",
252+
"AWS.output.sam.local.startDebug": "Preparing to debug '{0}' locally...",
252253
"AWS.output.sam.local.waiting": "Waiting for SAM Application to start before attaching debugger...",
253254
"AWS.output.starting.sam.app.locally": "Starting the SAM Application locally (see Terminal for output)",
254255
"AWS.prompt.mfa.enterCode.placeholder": "Enter Authentication Code Here",

src/shared/sam/localLambdaRunner.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,15 @@ export async function invokeLambdaFunction(
132132
): Promise<SamLaunchRequestArgs> {
133133
// Switch over to the output channel so the user has feedback that we're getting things ready
134134
ctx.chanLogger.channel.show(true)
135-
ctx.chanLogger.info('AWS.output.sam.local.start', 'Preparing to run {0} locally...', config.handlerName)
135+
if (!config.noDebug) {
136+
ctx.chanLogger.info(
137+
'AWS.output.sam.local.startDebug',
138+
"Preparing to debug '{0}' locally...",
139+
config.handlerName
140+
)
141+
} else {
142+
ctx.chanLogger.info('AWS.output.sam.local.startRun', "Preparing to run '{0}' locally...", config.handlerName)
143+
}
136144

137145
const processInvoker = new DefaultValidatingSamCliProcessInvoker({})
138146

0 commit comments

Comments
 (0)