Manage ACDL Files in Visual Studio Code


You can use the Alexa Skills Kit (ASK) Toolkit for Visual Studio Code (VS Code) to edit dialogs written in Alexa Conversation Descriptive Language (ACDL). The ASK Toolkit for VS Code is an extension that makes it easier to create, test, and deploy Alexa skills that use ACDL. For prerequisites and installation instructions, see Get Started with the ASK Toolkit for VS Code.

Alexa Conversations is a deep learning–based approach to dialog management that you use to create natural, human-like voice experiences on Alexa. You can use ACDL to write dialogs that represent different conversational experiences that your skill can support. For more details about how to use ACDL in a custom skill, see Develop Skills with the ACDL.

VS Code features for ACDL

ACDL files pull together Alexa Conversations assets to define sample conversations between the user and the skill. You express the sample conversations as annotated dialogs. The ASK Toolkit for VS Code includes editing features that support the ACDL language, such as autocompletion, real-time validation, and tool tips.

To preview and open ACDL dialogs in VS Code, find your ACDL files in <skill-directory>/skill-package/conversations/. For more details, see ACDL Files for Alexa Conversations.

View ACDL dialogs

As you make changes to sample dialogs in ACDL format, you can preview and open element definitions in the editor. For details about ACDL artifacts, see Alexa Conversations Core Library Reference and Alexa Conversations Description Language Reference.

To view ACDL definitions in VS Code

  1. In the EXPLORER sidebar, open your skill, and then expand skill-page > conversations.
  2. Open an .acdl file in the editor.
  3. To see a preview of the declaration for an action, named expression, or type, hover over the name.
  4. To see a preview of the definition for a dialog, utterance, or namespace, hover over the name.
  5. To view the declaration or definition, place your cursor over the name, and then press the F12 key.
    Or, in Windows, place your cursor over the name, and then press Ctrl+Click.
    In macOS, place your cursor over the name, and then press Command+Click.
  6. To open the declaration or definition to the side, in Windows, place your cursor over the name, and then press Ctrl+Alt+Click.
    Or, in macOS, place your cursor over the name, and then press Command+Option+Click.

Use auto completion

You can view suggestions and use auto-complete for the following ACDL built-in actions and types. Suggestions are contextual and ACDL type-aware.

  • Actions, such as expect(), ensure(), response(), and arguments for these actions, such as request acts, response acts, utterance sets.
  • Slot types
  • Keywords

View tool tips

The ASK Toolkit for VS Code provides tool tips about ACDL assets along with a short description. Hover with your mouse cursor over an identifier or object to see the description.

Debug with real-time validation

With real-time validation, you see ACDL errors and warnings rendered in line with red and yellow wavy lines beneath statements that are incorrect or could cause a problem. In the VS Code status bar, you see a summary of errors and warnings from the ACDL compiler, and in the PROBLEMS panel, you can view detailed errors and warnings. Review and correct these errors before you deploy your skill package.

Enable fully qualified namespaces (optional)

By default, the VS Code editor displays names without the namespace qualifier. For example, on hover and autocomplete, the editor displays expect instead of com.amazon.alexa.ask.conversations.expect. To display fully qualified namespaces during editing, enable the namespace setting in your VS Code editor.

To enable the namespace setting in the ASK extension

  1. In VS Code, on the activity bar, select View > Extensions.
  2. On the Extensions sidebar, under INSTALLED, navigate to the Alexa Skills Kit (ASK) Toolkit extension, and then click the settings gear.
  3. To enable fully qualified namespaces, under Ask Toolkit: Show Full ACDL Namespace, click Show fully qualified namespaces in ACDL Language Features while editing .acdl files.
  4. Exit VS Code, and then open VS Code.

Was this page helpful?

Last updated: Nov 23, 2023