Skip to content

Commit 6af4cc7

Browse files
committed
use noDebug field from config
1 parent deadc5a commit 6af4cc7

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

packages/core/src/lambda/vue/configEditor/samInvokeBackend.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -348,25 +348,17 @@ export class SamInvokeWebview extends VueWebview {
348348
* Validate and execute the provided launch config.
349349
* TODO: Post validation failures back to webview?
350350
* @param config Config to invoke
351-
* @param source Source of the invoke request
352-
* @param useDebugger Whether to invoke with debugger attached
353351
*/
354-
public async invokeLaunchConfig(
355-
config: AwsSamDebuggerConfiguration,
356-
source?: string,
357-
useDebugger: boolean = true
358-
): Promise<void> {
352+
public async invokeLaunchConfig(config: AwsSamDebuggerConfiguration, source?: string): Promise<void> {
359353
const finalConfig = finalizeConfig(
360354
resolveWorkspaceFolderVariable(undefined, config),
361355
'Editor-Created Debug Config'
362356
)
363357
const targetUri = await this.getUriFromLaunchConfig(finalConfig)
364358
const folder = targetUri ? vscode.workspace.getWorkspaceFolder(targetUri) : undefined
365359

366-
// Use the existing startDebugging method with the noDebug option
367-
await vscode.debug.startDebugging(folder, finalConfig, {
368-
noDebug: !useDebugger,
369-
})
360+
// startDebugging on VS Code goes through the whole resolution chain
361+
await vscode.debug.startDebugging(folder, finalConfig)
370362
}
371363
public async getLaunchConfigQuickPickItems(
372364
launchConfig: LaunchConfiguration,

packages/core/src/lambda/vue/configEditor/samInvokeFrontend.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export default defineComponent({
172172

173173
const source = this.resourceData?.source
174174

175-
client.invokeLaunchConfig(config, source, this.useDebugger).catch((e: Error) => {
175+
client.invokeLaunchConfig(config, source).catch((e: Error) => {
176176
console.error(`invokeLaunchConfig failed: ${e.message}`)
177177
})
178178
},
@@ -451,6 +451,7 @@ export default defineComponent({
451451
},
452452
}
453453
: undefined,
454+
noDebug: !this.useDebugger,
454455
}
455456
},
456457
clearForm() {

0 commit comments

Comments
 (0)