Skip to content

Commit 4f1f8b4

Browse files
authored
feat(lambda): user can invoke locally without debugging aws#7149
Add checkbox in local invoke webview so customers can choose to locally invoke with or without debugger
1 parent a7732b9 commit 4f1f8b4

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

packages/core/src/lambda/vue/configEditor/samInvokeComponent.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@
139139
</select>
140140
<span class="data-view">runtime in data: {{ launchConfig.lambda.runtime }}</span>
141141
</div>
142+
<div class="config-item">
143+
<label for="useDebugger">Attach a debugger</label>
144+
<input type="checkbox" id="useDebugger" v-model="useDebugger" name="useDebugger" />
145+
</div>
142146
</div>
143147
<div class="target-template" v-else-if="launchConfig.invokeTarget.target === 'template'">
144148
<div class="config-item">
@@ -195,6 +199,10 @@
195199
For invoke the runtime defined in the template is used.
196200
</p>
197201
</div>
202+
<div class="config-item">
203+
<label for="useDebugger">Attach a debugger</label>
204+
<input type="checkbox" id="useDebugger" v-model="useDebugger" name="useDebugger" />
205+
</div>
198206
</div>
199207
<div class="target-apigw" v-else-if="launchConfig.invokeTarget.target === 'api'">
200208
<button v-on:click.prevent="loadResource">Load resource</button><br />
@@ -229,6 +237,10 @@
229237
</select>
230238
<span class="data-view">runtime in data: {{ launchConfig.lambda.runtime }}</span>
231239
</div>
240+
<div class="config-item">
241+
<label for="useDebugger">Attach a debugger</label>
242+
<input type="checkbox" id="useDebugger" v-model="useDebugger" name="useDebugger" />
243+
</div>
232244
<div class="config-item">
233245
<label for="path">Path</label>
234246
<input type="text" v-model="launchConfig.api.path" />

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ interface SamInvokeVueData {
4848
showNameInput: boolean
4949
newTestEventName: string
5050
resourceData: ResourceData | undefined
51+
useDebugger: boolean
5152
}
5253

5354
function newLaunchConfig(existingConfig?: AwsSamDebuggerConfiguration): AwsSamDebuggerConfigurationLoose {
@@ -112,6 +113,7 @@ function initData() {
112113
return {
113114
containerBuild: false,
114115
skipNewImageCheck: false,
116+
useDebugger: true,
115117
launchConfig: newLaunchConfig(),
116118
payload: { value: '', errorMsg: '' },
117119
apiPayload: { value: '', errorMsg: '' },
@@ -449,6 +451,7 @@ export default defineComponent({
449451
},
450452
}
451453
: undefined,
454+
noDebug: !this.useDebugger,
452455
}
453456
},
454457
clearForm() {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "AppBuilder: unchecking the 'Attach a debugger' checkbox in local invoke webview invokes the function without a debugger"
4+
}

0 commit comments

Comments
 (0)