Skip to content

Commit 0e5c394

Browse files
authored
fix(lambda): robust checking on remote debugging (#8339)
## Problem Remote debugging doesn't work well on custom function types which doesn't support SnapStart ## Solution disable until it's supported --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 0e609ac commit 0e5c394

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

packages/core/src/lambda/vue/remoteInvoke/remoteInvoke.vue

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,21 @@
5454
id="attachDebugger"
5555
v-model="debugState.remoteDebuggingEnabled"
5656
@change="debugPreCheck"
57-
:disabled="!initialData.runtimeSupportsRemoteDebug || !initialData.remoteDebugLayer"
57+
:disabled="
58+
!initialData.runtimeSupportsRemoteDebug ||
59+
!initialData.remoteDebugLayer ||
60+
!initialData.LambdaFunctionNode?.configuration.SnapStart
61+
"
5862
class="remote-debug-checkbox"
5963
/>
6064
<div class="setting-description">
61-
<info-wrap v-if="initialData.runtimeSupportsRemoteDebug && initialData.remoteDebugLayer">
65+
<info-wrap
66+
v-if="
67+
initialData.runtimeSupportsRemoteDebug &&
68+
initialData.remoteDebugLayer &&
69+
initialData.LambdaFunctionNode?.configuration.SnapStart
70+
"
71+
>
6272
Remote debugging is not recommended for production environments. The AWS Toolkit modifies
6373
your function by deploying it with an additional layer to enable remote debugging. Your
6474
local code breakpoints are then used to step through the remote function invocation.
@@ -83,6 +93,12 @@
8393
<info v-else-if="!initialData.remoteDebugLayer" style="color: var(--vscode-errorForeground)">
8494
Region {{ initialData.FunctionRegion }} doesn't support remote debugging yet
8595
</info>
96+
<info
97+
v-else-if="!initialData.LambdaFunctionNode?.configuration.SnapStart"
98+
style="color: var(--vscode-errorForeground)"
99+
>
100+
Doesn't support remote debugging yet
101+
</info>
86102
</div>
87103
</div>
88104
</div>

0 commit comments

Comments
 (0)