Appendix 1
Running and Debugging Skill Code Locally

In chapter two, you saw several techniques for testing your skill, including semi-automated and automated testing tools. While automated testing gives the most consistent and reliable test results, they don’t offer the same level of satisfaction you can get from actually talking to a real Alexa device (or through a virtual device such as the testing tool in the Alexa Developer Console) and hearing the results spoken back to you.

As you develop your Alexa skill, vocally testing along the way, you might find the repeated cycle of editing, deploying, and testing creates friction in your work. Specifically, the deployment step will bring you to a full stop while you wait for your skill’s fulfillment code to be deployed to AWS Lambda.

If you are only making changes to the fulfillment code (not the interaction model), then you can tighten that development cycle by eliminating the deployment step and setting up your project to run locally. In this setup, Alexa will route requests for your skill’s code to your local machine, enabling near-instantaneous turnaround on your changes and allowing you to debug your code while manually testing it.

This appendix walks you through setting up your skill for running fulfillment code locally, including tips on debugging your skill in Visual Studio Code. The first step is to deploy the skill’s interaction model.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset