ask-toolkit-for-vscode icon indicating copy to clipboard operation
ask-toolkit-for-vscode copied to clipboard

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

Open eigoninaritai-naokichi opened this issue 2 years ago • 8 comments

  • ASK Toolkit version: v2.14.2
  • VSCode version: 1.80.0 (user setup)
  • Python version: 3.11.2
  • Operating System: Windows10 on Docker container

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

eigoninaritai-naokichi avatar Jul 13 '23 05:07 eigoninaritai-naokichi

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

caccia78 avatar Aug 02 '23 12:08 caccia78

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] avatar Oct 02 '23 01:10 github-actions[bot]

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

github-actions[bot] avatar Oct 10 '23 01:10 github-actions[bot]

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] avatar Dec 10 '23 01:12 github-actions[bot]

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

eigoninaritai-naokichi avatar Dec 10 '23 05:12 eigoninaritai-naokichi

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

eigoninaritai-naokichi avatar Dec 10 '23 05:12 eigoninaritai-naokichi

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] avatar Feb 10 '24 01:02 github-actions[bot]

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: @.***>

caccia78 avatar Feb 10 '24 08:02 caccia78

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] avatar Apr 12 '24 01:04 github-actions[bot]

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] avatar Jun 12 '24 01:06 github-actions[bot]

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

github-actions[bot] avatar Jun 19 '24 01:06 github-actions[bot]