-
Install the Alexa Skills Kit Toolkit:
-
Download your code from the Alexa Developer console
-
Install the local debug package
npm install
npm install --save-dev ask-sdk-local-debug
- Create a launch.json file by clicking the run and debug icon on the left toolbar an clicking the create launch.json link
- Include the Alexa configuration to the launch.json file
(Note, the last part of this config had the region set to NA. I had to change this to EU to get it to work in my case)
Example Launch.json:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug Alexa Skill (Node.js)",
"type": "pwa-node",
"request": "launch",
"program": "${command:ask.debugAdapterPath}",
"args": [
"--accessToken",
"${command:ask.accessToken}",
"--skillId",
"${command:ask.skillIdFromWorkspace}",
"--handlerName",
"handler",
"--skillEntryFile",
"${workspaceFolder}/lambda/index.js",
"--region",
"NA"
],
"cwd": "${workspaceFolder}/lambda"
}
]
}
- Run, Start Debugging
From here you can set breakpoints in your code and hit them by invoking the intent using and Echo device or using the simulator in the skills kit.