aws / aws/aws-sam-cli

Debug not works with "Sam local start-api" with "--debug-port" and "--warm-containers"

Open
#3,749 15 comments 4 reactions 0 assignees View on GitHub
maintainer/need-followup stage/bug-repro
Dominant language
Python
Stars
6.7k
Forks
1.2k
Avg merge
1d 10h
Merged PRs (30d)
52

Description

With this command:
`sam local start-api --template-file template.yml --region eu-west-1 --debug-port 5555 --warm-containers EAGER`

and this launch.json
```
{
"name": "Attach to SAM CLI",
"type": "node",
"request": "attach",
"address": "localhost",
"port": 5555,
"localRoot": "${fileDirname}",
"remoteRoot": "/var/task",
"protocol": "inspector",
"stopOnEntry": false
}
```

my Visual Studio Code doesn't attach to container, I have no error or log, simply after 5 seconds the debug's topbar disappear.
The terminal logs doesn't show "Debugging listening on...." when I try lo execute an HTTP request.

All works fine removing --warm-containers param.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.