Replies: 1 comment 3 replies
-
@lorenh Good morning. I was able to debug the Annotations framework code using Lambda test tool based on guidance provided in #1498 (comment). After the Lambda test tool is launched:
Hope this helps. Thanks, |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
( Updated with some forward progress below, but still not fully able to debug )
( Updated once again with some more forward progress below, but still wondering if this is just how it is )
This is my first experiment with the Annotations Framework, and I'm struggling with a local debug flow. Our previous Lambdas have been the aspnetcore style with two different entry points, one for local and one for lambda, and local F5 debugging "just works".
So now I'm excited to try out the Native AOT with dotnet8 blueprint. When I have it set up the way I thought I was supposed to, the Lambda test tool pops up, and when I pass in a request based on the "API Gateway V2 HTTP API" structure, the Lambda test tool just report an error
My launchsettings.json looks like this:
I know people are developing locally somehow, I just can't figure out the combination to get it to work. There is a lot of generation magic going on behind the scenes with the Annotation Framework and I'm just not connecting the dots somehow. At present, the only way I can execute my code is to publish it to AWS Lambda in the cloud and run it there. Can I ask how others are debugging locally without deploying?
-- Follow up
I feel like I'm making some progress, I had completely missed the "Executable Assembly" page in the test tool. Now I see that and I know to change my startup profile to something like this:
and start the lambda test tool ahead of time with "dotnet lambda-test-tool-8.0" (Thanks to Ashish #1539 (comment))
However, now when I set breakpoints in my function and start the debugger. It just ends right away, no queued events seem to be getting read, and no breakpoints are getting hit.
Once again, I know people are successfully developing using the Annotations Framework, but I must be doing something wrong.
-- Follow up 2 (sorry about the play-by-play here, the story is unfolding as I go)
OK, so I FINALLY got it to stop on a breakpoint. After decompiling the generated "Main()" method I see that the key to getting it to run code is to set the "ANNOTATIONS_HANDLER" environment variable.
So once I changed my launch setting profile to this, it worked. Is this what you all are doing? Then do you create different launch profiles for each function in your Functions class in cases where there may be many?
Now I seem to be having issues with the application assembly getting locked by the test tool in the bin folder so I can't build code again without leaving visual studio and test tool completely to free the assembly. This whole inner loop development cycle just seems so clunky, I have to be missing something.
Beta Was this translation helpful? Give feedback.
All reactions