aws-lambda-dotnet icon indicating copy to clipboard operation
aws-lambda-dotnet copied to clipboard

Lambda PowerShell Functions Do Not Log Debug Messages to CloudWatch Messages

Open ashovlin opened this issue 2 years ago • 0 comments

Describe the bug

We already have internal case and ticket V1078993289 for this, but creating this so others can track a fix publicly.

Expected Behavior

"Write-Debug" should print to CloudWatch messages when adding -Debug parameter or using $DebugPreference to get the message displayed on console.

Current Behavior

Messages aren't logged.

Possible Solution

This probably is happening because "Write-Debug" isn't included in these events https://github.com/aws/aws-lambda-dotnet/blob/master/Libraries/src/Amazon.Lambda.PowerShellHost/PowerShellFunctionHost.cs#L294

ashovlin avatar Dec 12 '23 16:12 ashovlin