Bug: Can't trigger delve debug server when Handler name is bootstrap
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 1.2k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 52
Description
### Description:
I was running local debug for my go lambda function by using go1.x runtime. And there is a situation beyond understanding.
At first, I just generated a go lambda project by "sam init" (the simplest one 'hello world'), which the 'Handler' name is 'bootstrap' in template.yml. Then I used "sam local start-api -d 8099 --debugger-path=**\go\bin\linux_amd64 --debug-args="-delveAPI=2"" and tried to attach with goland remote debug client, but it failed. After I compared with others' project, I finally get the debugger attached by changing the 'Handler' name to sth else like 'hello-world'. I don't understand why a Handler name in template.yml would effect the trigger of delve. Could you explain it please?
### Steps to reproduce:
1. generate a go lambda project by sam init (Handler name: bootstrap)
2. sam build (make)
3. sam local start-api -d 8099 --debugger-path=**\go\bin\linux_amd64 --debug-args="-delveAPI=2"
4. go remote debug (goland)
### Observed result:
The debugger is disconnected all the time. And the request went through without break point stop.
### Expected result:
The 'Handler' name should not effect debugger.
### Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
1. OS: Windows
2. `sam --version`: 1.127
3. AWS region: eu-central-1
```
# Paste the output of `sam --info` here
```
`Add --debug flag to command you are running`
Contributor guide
Assessment
This issue has not been assessed yet.