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

Add --print-tool-path CLI arguments to simplify IDE debug configuration

Open ggaller opened this issue 1 year ago • 0 comments

The main purpose of this argument is to print to the console the path to the executable file that is used when configuring the debug inside IDE. It respects IDE requirements, so for Visual Studio and Visual Studio Code it return path to .exe file for other path to .dll file.

For example on MacOS it return for VSCode:

% dotnet-lambda-test-tool-6.0 --print-tool-path vscode
AWS .NET Core 6.0 Mock Lambda Test Tool (0.12.3)
/Users/someuser/.dotnet/tools/dotnet-lambda-test-tool-6.0

and for Rider

% dotnet-lambda-test-tool-6.0 --print-tool-path other 
AWS .NET Core 6.0 Mock Lambda Test Tool (0.12.3)
/Users/someuser/.dotnet/tools/.store/amazon.lambda.testtool-6.0/0.12.3/amazon.lambda.testtool-6.0/0.12.3/tools/net6.0/any/Amazon.Lambda.TestTool.BlazorTester.dll

Also tested on Windows.

Changes:

  1. Added new cli argument --print-tool-path;
  2. Added a method to use GetToolPath, which returns the path to the executable file, taking into account the requirements of the IDE

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

ggaller avatar Mar 16 '23 09:03 ggaller