0

I'm using Jetbrains Rider with Mock Lambda Test Tool and for some reason I am unable to Debug my code with the tool - the Debug button in Rider is just greyed out:

enter image description here

Here is my Run/Debug Configuration:

enter image description here

And this is my launchSettings.json file:

enter image description here

The Mock Lambda Test Tool launches fine in the browser fine when just clicking "Run", but can't Debug in that mode.

Any help or pointers would be great

ZachOverflow
  • 387
  • 1
  • 3
  • 14

2 Answers2

3

my launchSettings.json seems like the following,

{
"profiles": {
"Mock Lambda Test Tool vs2022": {
  "commandName": "Executable",
  "commandLineArgs": "--port 5050",
  "workingDirectory": ".\\bin\\$(Configuration)\\netcoreapp3.1",
  "executablePath": "%USERPROFILE%\\.dotnet\\tools\\dotnet-lambda-test-tool-3.1.exe",
  "environmentVariables": {
    "TABLE_PREFIX": "dev"
  }
},
"Mock Lambda Test Tool Rider": {
  "commandName": "Executable",
  "commandLineArgs": "--port 5050",
  "workingDirectory": "$(ProjectDir)",
  "executablePath": "%USERPROFILE%\\.dotnet\\tools\\.store\\amazon.lambda.testtool-3.1\\0.11.4\\amazon.lambda.testtool-3.1\\0.11.4\\tools\\netcoreapp3.1\\any\\Amazon.Lambda.TestTool.BlazorTester.dll",
  "environmentVariables": {
    "TABLE_PREFIX": "dev"
  }
}
}
}

And it works like a charm with Rider

unos baghaii
  • 2,539
  • 4
  • 25
  • 42
1

Solved the problem by using .NET Executable instead of .Net Launch Settings Profile.

I set the Exe path to to be C:/Users/$(USERNAME)/.dotnet/tools/.store/amazon.lambda.testtool-3.1/0.10.1/amazon.lambda.testtool-3.1/0.10.1/tools/netcoreapp3.1/any/Amazon.Lambda.TestTool.WebTester31.dll

And the working directory as the Project Root of my Lambda project.

ZachOverflow
  • 387
  • 1
  • 3
  • 14
  • 1
    Just for what its worth, when using version 0.11.3 your initial launch settings worked for me even though thats not what is stated in their documentation. Bless you for posting this, I spent hours trying to run a lambda locally and this is the first post I see that mentions using mock tool – biso Jun 08 '21 at 18:49