Skip to content

Commit f275753

Browse files
committed
chore: Updated Lambda Test Tool Readme to document steps for testing/debugging executable assemblies function handler code.
1 parent 8b76cdd commit f275753

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Tools/LambdaTestTool/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,31 @@ If you are developing .NET Lambda function using **custom runtimes** or C# **top
242242

243243
**NOTE:** Adjust the port if this was changed in test tool configuration.
244244

245+
At high level, below are the steps to debug executable assemblies using Lambda Test tool:
246+
- Navigate to project's root directory containing `.csproj` file.
247+
- Run `dotnet lambda-test-tool-<<version>>` (e.g `dotnet lambda-test-tool-8.0`) to launch Lambda Test Tool.
248+
- As mentioned in Lambda Test Tool documentation at http://localhost:5050/documentation, in project's `launchSettings.json`, specify the environment variables either via Visual Studio Debug UI or modifying the `launchSettings.json` manually:
249+
```JSON
250+
{
251+
"profiles": {
252+
"Lambda Runtime API": {
253+
"commandName": "Project",
254+
"environmentVariables": {
255+
"AWS_LAMBDA_RUNTIME_API": "localhost:5050",
256+
"AWS_PROFILE": "default",
257+
"AWS_REGION": "us-east-2"
258+
}
259+
}
260+
}
261+
}
262+
```
263+
- Setup breakpoint in Lambda function handler.
264+
- Debug project using Visual Studio.
265+
- In Lambda Test Tool's `Executable Assembly` page, queue the event (for project created using Native AOT Visual Studio AWS template, the handler converts input string to upper case and returns it. Hence we may pass double quoted string, e.g. `"Hello World"` from test tool)
266+
- Execution would now stop at breakpoint set in Lambda function handler in Visual Studio.
267+
268+
269+
245270

246271

247272
## Known Limitations

0 commit comments

Comments
 (0)