Closed stpanzer closed 1 year ago
@stpanzer Looks like in Amazon.Lambda.Tools
version 5.6.0
, the change to skip dbg
and pdb
files was added at https://github.com/aws/aws-extensions-for-dotnet-cli/blob/599a3508d9c37e1e5784df76ba89abad1f49f7a9/src/Amazon.Lambda.Tools/LambdaPackager.cs#L592.
I do see in your log that you are using Release
configuration per command dotnet publish "/home/radicaledward/test/dotnettest" --output "/home/radicaledward/test/dotnettest/bin/Release/net6.0/publish" --configuration "Release" --framework "net6.0" /p:GenerateRuntimeConfigurationFiles=true --runtime linux-x64 --self-contained False
. The above logic appears to be common for release and debug configuration, however, unsure if we should include pdb
files in Release
configuration.
Needs review with the team.
Thanks, Ashish
@stpanzer sorry for breaking your debug workflow. I'll work on getting a fix out quickly.
For background we have been working on adding Native AOT support and we wanted to not bundle the dbg
files in, the native debug symbols file, because they are huge. We were over reaching by also removing pdb
files to reduce executable size which aren't even generated for Native AOT. I'll change the code to only remove dbg
files to unblock you. In the future we might add back a setting to optional exclude pdb
files.
@normj @ashishdhingra Thanks for the quick responses!
Given the code linked above, I assume there isn't a workaround for 5.6.0?
Unfortunately, sam build
will always update to the most recent version of Amazon.Lambda.Tools
- https://github.com/aws/aws-lambda-builders/issues/347
I've been looking at patching the sam cli locally to stop this behavior but it's a bit more complicated than I'd hoped, and I'm no python dev 😄.
The code is in the pipeline for release, so unless something unusual happens the fix should be out within the next couple hours.
Only work around till then I can think of is if you pull 5.5.0 into a local folder and set the folder up as a NuGet feed. Then put a nuget.config file that only has the local feed.
Version 5.6.1 of Amazon.Lambda.Tools is out. Sorry again for the regression and thanks for letting us know.
Closing since the fix has been released.
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
When running
dotnet lambda package
, the zip stage skips the PDB file. This breaks local debugging for SAM applications.I've confirmed the previous behavior in 5.5.0 (see repro steps) was to copy the PDB file.
Expected Behavior
The PDB file to be copied into the zip.
Current Behavior
PDB file was not copied.
Reproduction Steps
Note that this works fine on 5.5.0:
Possible Solution
No response
Additional Information/Context
No response
Targeted .NET platform
6.0.302
CLI extension version
Environment details (OS name and version, etc.)
WSL ubuntu