Debugging the endpoint locally

In the previous section, you configured the endpoint in the Alexa Cooking skill and managed to test it using the Alexa console. In this section, you will run the endpoint service locally in order to be able to troubleshoot any issues you might come across. Testing locally, you can step through the code and debug issues, which will be very useful:

  1. Open Visual Studio Code.
  2. Open the server.js file where you wrote the endpoint code.
  3. Comment out line 10 //alexaRouter.use(verifier). When running and debugging locally, you need to bypass Alexa's security middleware, and by doing so you can debug using the JSON input from step 9.
  1. Hit F5 to start debugging the server.js locally. The endpoint is running on http://localhost:8000 ...

Get Voice User Interface Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.