aws / aws-toolkit-jetbrains

AWS Toolkit for JetBrains - a plugin for interacting with AWS from JetBrains IDEs
https://plugins.jetbrains.com/plugin/11349-aws-toolkit
Apache License 2.0
744 stars 213 forks source link

Rider 2023 / aws.toolkit ver1.65-231 - Timeout while waiting for debugger to connect #3597

Open mbv401920150 opened 1 year ago

mbv401920150 commented 1 year ago

Describe the bug I'm using Rider 2023.1 (Updated on April 4, 2023). And I'm trying to run/debug the HelloWorld Lambda Function on .netcode 6

When I run the Lambda everything goes fine. But if I tried to debug, I get errors.

docker ps
"C:\Program Files\Amazon\AWSSAMCLI\bin\sam.cmd" build HelloWorldFunction --template C:\Users\mbolanos\RiderProjects\HelloWorld\template.yaml --build-dir C:\Users\mbolanos\RiderProjects\HelloWorld\.aws-sam\build --skip-pull-image
Starting Build use cache
Cache is invalid, running build and copying resources for following functions (HelloWorldFunction)
Building codeuri: C:\Users\mbolanos\RiderProjects\HelloWorld\src\HelloWorld runtime: dotnet6 metadata: {} architecture: x86_64 functions: HelloWorldFunction
Running DotnetCliPackageBuilder:GlobalToolInstall

Tool 'amazon.lambda.tools' was reinstalled with the latest stable version (version '5.6.6').
Running DotnetCliPackageBuilder:RunPackageAction
Amazon Lambda Tools for .NET Core applications (5.6.6)
Project Home: https://github.com/aws/aws-extensions-for-dotnet-cli, https://github.com/aws/aws-lambda-dotnet

Executing publish command
Deleted previous publish folder
... invoking 'dotnet publish', working folder 'C:\Users\mbolanos\RiderProjects\HelloWorld\src\HelloWorld\bin\Release\net6.0\publish'
... dotnet publish "C:\Users\mbolanos\RiderProjects\HelloWorld\src\HelloWorld" --output "C:\Users\mbolanos\RiderProjects\HelloWorld\src\HelloWorld\bin\Release\net6.0\publish" --configuration "Release" --framework "net6.0" --runtime linux-x64 /p:GenerateRuntimeConfigurationFiles=true --self-contained False 
... publish: MSBuild version 17.6.0-preview-23152-03+47a712160 for .NET
... publish:   Determining projects to restore...
... publish:   All projects are up-to-date for restore.
... publish: C:\Program Files\dotnet\sdk\8.0.100-preview.2.23157.25\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(287,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\Users\mbolanos\RiderProjects\HelloWorld\src\HelloWorld\HelloWorld.csproj]
... publish:   HelloWorld -> C:\Users\mbolanos\RiderProjects\HelloWorld\src\HelloWorld\bin\Release\net6.0\linux-x64\HelloWorld.dll
... publish:   HelloWorld -> C:\Users\mbolanos\RiderProjects\HelloWorld\src\HelloWorld\bin\Release\net6.0\publish\
Zipping publish folder C:\Users\mbolanos\RiderProjects\HelloWorld\src\HelloWorld\bin\Release\net6.0\publish to C:\Users\mbolanos\RiderProjects\HelloWorld\.aws-sam\build\HelloWorldFunction\HelloWorld.zip
Creating directory C:\Users\mbolanos\RiderProjects\HelloWorld\.aws-sam\build\HelloWorldFunction
... zipping: Amazon.Lambda.APIGatewayEvents.dll
... zipping: Amazon.Lambda.Core.dll
... zipping: Amazon.Lambda.Serialization.SystemTextJson.dll
... zipping: HelloWorld.deps.json
... zipping: HelloWorld.dll
... zipping: HelloWorld.pdb
... zipping: HelloWorld.runtimeconfig.json
Created publish archive (C:\Users\mbolanos\RiderProjects\HelloWorld\.aws-sam\build\HelloWorldFunction\HelloWorld.zip).
Lambda project successfully packaged: C:\Users\mbolanos\RiderProjects\HelloWorld\.aws-sam\build\HelloWorldFunction\HelloWorld.zip

Build Succeeded

Built Artifacts  : .aws-sam\build
Built Template   : .aws-sam\build\template.yaml

Commands you can use next
=========================
[*] Validate SAM template: sam validate
[*] Invoke Function: sam local invoke
[*] Test Function in the Cloud: sam sync --stack-name {{stack-name}} --watch
[*] Deploy: sam deploy --guided
"C:\Program Files\Amazon\AWSSAMCLI\bin\sam.cmd" local invoke HelloWorldFunction --template C:\Users\mbolanos\RiderProjects\HelloWorld\.aws-sam\build\template.yaml --event "C:\Users\mbolanos\AppData\Local\Temp\[Local] FunctionHandler-event5.json" --debugger-path "C:\Program Files\JetBrains\JetBrains Rider 231.7864.80\lib\ReSharperHost" --debug-port 65478 --debug-port 65479 --skip-pull-image
Invoking HelloWorld::HelloWorld.Function::FunctionHandler (dotnet6)
Requested to skip pulling images ...

Mounting C:\Users\mbolanos\RiderProjects\HelloWorld\.aws-sam\build\HelloWorldFunction as /var/task:ro,delegated, inside runtime container
START RequestId: c76fcaca-48dc-4e62-8b9b-da49bcfa4de5 Version: $LATEST
[Info] Waiting for the debugger to attach...

To reproduce

  1. Debug the Lambda.
  2. Wait to build.
  3. Wait to the image get load to docker.
  4. The Attach Debugger after ~30 secs throws an error message. image
  5. After more than 6 minutes anything happens.

Expected behavior Be able to debug the code of the lamda function and be able to see the variables information and step into the code line by line.

Screenshots Run scenario: image

Debug scenario: image

Your Environment JetBrains Rider 2023.1 Build #RD-231.8109.212, built on April 4, 2023 Runtime version: 17.0.6+10-b829.5 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 11.0 .NET 7.0.2 (Server GC) GC: G1 Young Generation, G1 Old Generation Memory: 1500M Cores: 12 Registry: ide.experimental.ui=true ide.browser.jcef.gpu.disable=true ide.new.project.model.index.case.sensitivity=true vcs.empty.toolwindow.show=false database.show.search.tab=false rdclient.asyncActions=false

Non-Bundled Plugins: com.markskelton.one-dark-theme (5.7.4) com.arcticicestudio.nord.jetbrains (0.13.0) com.thvardhan.gradianto (5.1) Abc.MoqComplete.Rider (2022.3.0.2) com.jetbrains.darkPurpleTheme (1.3) com.intellij.resharper.StructuredLogging (2023.1.0.296) me.seclerp.rider.plugins.efcore (231.1.1) monokai-pro (1.10) com.vermouthx.idea (1.14.2) org.jetbrains.advocates.rider.plugins.dotnetwatch (2023.1.1) com.intellij.resharper.azure (3.50.0.1590-2023.1) aws.toolkit (1.65-231)

Additional context Seems these kinds of problems are common from around 2-3 years with a concrete solution.

Anarios commented 10 months ago

Same problem