alexa / ask-toolkit-for-vscode

ASK Toolkit is an extension for Visual Studio Code (VSC) that that makes it easier for developers to develop and deploy Alexa Skills.
https://developer.amazon.com/en-US/docs/alexa/ask-toolkit/get-started-with-the-ask-toolkit-for-visual-studio-code.html
Apache License 2.0
107 stars 52 forks source link

Error occurred while trying to debug Alexa Skill using ASK Toolkit in Python environment on VSCode #270

Closed eigoninaritai-naokichi closed 1 month ago

eigoninaritai-naokichi commented 1 year ago

Description:

I am encountering an error while attempting to perform local debugging of an Alexa Skill using the ASK Toolkit (v2.14.2) in VSCode. Despite following the provided instructions and configuring the launch.json file accordingly, I am unable to initiate the debugging process successfully.

Steps to Reproduce:

  1. Install the ASK Toolkit (v2.14.2) in VSCode.
  2. Configure the launch.json file as follows:
    {
    "version": "0.2.0",
    "configurations": [
    {
      "name": "Debug Alexa Skill (Python)",
      "type": "python",
      "request": "launch",
      "program": "${command:ask.debugAdapterPath}",
      "python": "${command:python.interpreterPath}",
      "args": [
        "--accessToken",
        "${command:ask.accessToken}",
        "--skillId",
        "${command:ask.skillIdFromWorkspace}",
        "--skillHandler",
        "lambda_handler",
        "--skillFilePath",
        "${workspaceFolder}/lambda/lambda_function.py",
        "--region",
        "NA"
      ],
      "console": "internalConsole",
      "cwd": "${workspaceFolder}/lambda"
    }
    ]
    }

Expected Behavior:

I expected the ASK Toolkit to successfully launch the local debugging session for the Alexa Skill, allowing me to effectively test and debug the skill code.

Actual Behavior:

However, upon attempting to initiate the debugging process, the following error message is displayed:

Command failed: "undefined" -c "import site; print(site.getsitepackages())"
/bin/sh: 1: undefined: not found
caccia78 commented 11 months ago

Same issue here. The problem is that the command "command:ask.debugAdapterPath" is not found. Looking at the Alexa Visual Studio module I see that the command file debugAdapterPath.ts is in the subdirectory local-debug. I don't have experience with VSC modules development but this might be the issue.

My temporary solution was to directly link the debugger file. In the launch.json file replace: "program": "${command:ask.debugAdapterPath}"

with "program": "${workspaceFolder}/.venv/lib/python3.11/site-packages/ask_sdk_local_debug/local_debugger_invoker.py",

Hope this can help

github-actions[bot] commented 9 months ago

This issue is stale since it has been open for 60 days with no activity. Please respond or this issue will be closed soon.

github-actions[bot] commented 9 months ago

This stale issue has been closed now. Please reopen the issue if you are still having problems with the toolkit.

github-actions[bot] commented 7 months ago

This issue is stale since it has been open for 60 days with no activity. Please respond or this issue will be closed soon.

eigoninaritai-naokichi commented 7 months ago

This bug report issue remains unresolved. Please take a look.

eigoninaritai-naokichi commented 7 months ago

This bug report issue remains unresolved. Please take a look.

github-actions[bot] commented 5 months ago

This issue is stale since it has been open for 60 days with no activity. Please respond or this issue will be closed soon.

caccia78 commented 5 months ago

Issue is still validSent by iPhoneIl giorno 10 feb 2024, alle ore 02:32, github-actions[bot] @.***> ha scritto: This issue is stale since it has been open for 60 days with no activity. Please respond or this issue will be closed soon.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

github-actions[bot] commented 3 months ago

This issue is stale since it has been open for 60 days with no activity. Please respond or this issue will be closed soon.

github-actions[bot] commented 1 month ago

This issue is stale since it has been open for 60 days with no activity. Please respond or this issue will be closed soon.

github-actions[bot] commented 1 month ago

This stale issue has been closed now. Please reopen the issue if you are still having problems with the toolkit.