Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Can't trigger delve debug server when Handler name is bootstrap #7646

Open
HLN177 opened this issue Nov 5, 2024 · 2 comments
Open

Bug: Can't trigger delve debug server when Handler name is bootstrap #7646

HLN177 opened this issue Nov 5, 2024 · 2 comments
Labels
blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale.

Comments

@HLN177
Copy link

HLN177 commented Nov 5, 2024

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

@HLN177 HLN177 added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Nov 5, 2024
@sidhujus
Copy link
Contributor

sidhujus commented Nov 7, 2024

Hi @HLN177 thanks for bringing this up. go1.x is deprecated could you confirm that is the correct runtime you're using?

@sidhujus sidhujus added blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. and removed stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Nov 7, 2024
@HLN177
Copy link
Author

HLN177 commented Nov 7, 2024

Hi @HLN177 thanks for bringing this up. go1.x is deprecated could you confirm that is the correct runtime you're using?

HI, thanks for your reply. Yes, I use go1.x for debugging purpose coz sam have not supported debug mode for os runtime (provided.al2 / provided.al2023) yet. #7291

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale.
Projects
None yet
Development

No branches or pull requests

2 participants