![]() ![]() You’ll want to follow the specific steps for Node.js in your case. After installing your language SDK, be sure to configure your toolchain.If Visual Studio Code is open when you update your config file, you might need to close and reopen the editor. For more information, see Configuration and credential file settings in the AWS Command Line Interface User Guide. Identify your default AWS Region in your AWS config file.If Visual Studio Code is open when you perform these installations, you might need to close and reopen the editor. See AWS SAM CLI in the setup prerequisites. Install the AWS Serverless Application Model (AWS SAM) command line interface (CLI) and its prerequisites.Docker is required for local debugging of Lambda functions. Be sure to view the optional section which mentions installing Docker. Be sure that your system meets the required prerequisites specified in Installing the AWS Toolkit for Visual Studio Code.You’ll want to read through the steps fully at the following link], but I’ll go ahead and list the steps below: You can use AWS SAM to debug and test applications on your local machine and it supports Microsoft Visual Studio Code debugging via the AWS Toolkit for VSCode. When I resume from there my breakpoint in my function is not hit but the API request completes. When I restart local SAM in debug mode sam local start-api -d 5858 and attach from VSCode and reissue my GET request VSCode opens \var\runtime\index.js and stops on the first line of code.I can hit my local Lambda API endpoint using PostMan to GET.I am invoking local SAM sam local start-api.SAM is far more convoluted and I am wondering if it even supports local debugging? I can then set a breakpoint in any function/endpoint, request that endpoint using PostMan and my code pauses on the breakpoint. I just start the plugin and attach my VSCode debugger. Serverless makes it very easy to debug locally using the serverless-offline plugin. I am trying to switch from the Serverless Framework to SAM for Lambda/API development. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |