Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
eigoninaritai-naokichi opened this issue Jul 13, 2023 · 9 comments
Labels
bug Something isn't working P0

Comments

@eigoninaritai-naokichi
Copy link

eigoninaritai-naokichi commented Jul 13, 2023

  • 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
@caccia78
Copy link

caccia78 commented Aug 2, 2023

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
Copy link

github-actions bot commented Oct 2, 2023

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
Copy link

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

@tydonelson tydonelson reopened this Oct 10, 2023
@tydonelson tydonelson added bug Something isn't working and removed closing soon if no response labels Oct 10, 2023
Copy link

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
Copy link
Author

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

@eigoninaritai-naokichi eigoninaritai-naokichi closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2023
@eigoninaritai-naokichi
Copy link
Author

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

Copy link

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
Copy link

caccia78 commented Feb 10, 2024 via email

Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P0
Projects
None yet
Development

No branches or pull requests

3 participants