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
108 stars 52 forks source link

ASK Debugging broken in VS Code 1.60 #142

Closed mcse3010 closed 3 years ago

mcse3010 commented 3 years ago

When attempting to run in debug in VS Code 1.6.0 - (ASK v2.8.0), I receive the following error: Running the contributed command: 'ask.debugAdapterPath' failed.

In the output ASK Toolkit window, the following error appears: [error - date/time] Invalid languate type 'pwa-node' provided.

To reproduce

  1. install v1.6.0 of VS Code (64 bit, system install in my case).
  2. Open ask project
  3. Click Run -> Start Debugging
  4. Receive error above: "Running the contributed command: 'ask.debugAdapterPath' failed."

Extension Logs

[debug - 2021-09-13 00:54:44.711Z] Calling method: ask.debugAdapterPath, args: [{"type":"pwa-node","name":"Debug Alexa Skill (Node.js)","request":"launch","trace":{"console":false,"level":"fatal","stdio":false,"logFile":null,"tags":[]},"outputCapture":"console","timeout":10000,"timeouts":{},"showAsyncStacks":true,"skipFiles":[],"smartStep":true,"sourceMaps":true,"sourceMapRenames":true,"pauseForSourceMap":false,"rootPath":"C:\\Users\\Chadwick\\source\\repos\\unofficialfreshbooksaccounting","outFiles":["C:\\Users\\Chadwick\\source\\repos\\unofficialfreshbooksaccounting/**/*.js","!**/node_modules/**"],"sourceMapPathOverrides":{"webpack:///./~/*":"C:\\Users\\Chadwick\\source\\repos\\unofficialfreshbooksaccounting/lambda/node_modules/*","webpack:////*":"/*","webpack://?:*/*":"C:\\Users\\Chadwick\\source\\repos\\unofficialfreshbooksaccounting/lambda/*","webpack:///([a-z]):/(.+)":"$1:/$2","meteor://??app/*":"C:\\Users\\Chadwick\\source\\repos\\unofficialfreshbooksaccounting/lambda/*"},"enableContentValidation":true,"cascadeTerminateToConfigurations":[],"__workspaceFolder":"c:\\Users\\Chadwick\\source\\repos\\unofficialfreshbooksaccounting","__autoExpandGetters":false,"__breakOnConditionalError":false,"cwd":"C:\\Users\\Chadwick\\source\\repos\\unofficialfreshbooksaccounting/lambda","env":{},"envFile":null,"localRoot":null,"remoteRoot":null,"autoAttachChildProcesses":true,"runtimeSourcemapPausePatterns":[],"program":"${command:ask.debugAdapterPath}","stopOnEntry":false,"console":"internalConsole","restart":false,"args":["--accessToken","${command:ask.accessToken}","--skillId","${command:ask.skillIdFromWorkspace}","--handlerName","handler","--skillEntryFile","C:\\Users\\Chadwick\\source\\repos\\unofficialfreshbooksaccounting/lambda/index.js","--region","NA"],"runtimeExecutable":"node","runtimeVersion":"default","runtimeArgs":[],"profileStartup":false,"attachSimplePort":null,"killBehavior":"forceful","__configurationTarget":5,"__workspaceCachePath":"c:\\Users\\Chadwick\\AppData\\Roaming\\Code\\User\\workspaceStorage\\32ff08714843a2bc8f127e2348cdb971\\ms-vscode.js-debug"}]
[error - 2021-09-13 00:54:44.711Z] Invalid language type 'pwa-node' provided. 

Expected behavior Expect debugger to attach and start (as does in v1.59.1)

Screenshots image

Desktop (please complete the following information): OS: Windows_NT x64 10.0.18363 Visual Studio Code Version: 1.60.0 Alexa Skills Toolkit Version: 2.8.0 Git Version: git version 2.32.0.windows.1

Additional context As a workaround, uninstalling VS Code 1.60 and installing the version 1.59.1 from here seems to fix the issue (at least for me): https://code.visualstudio.com/updates/v1_59

sattpat commented 3 years ago

Sounds like the ask vscode extension has not been activated? Could you verify if that is the case? Clicking on the alexa icon on the sidebar would activate the extension

techandsoftware commented 3 years ago

I've hit the same issue. The error occured in VS Code 1.60.1, and disappears with 1.59.1

I downloaded an Alexa-hosted skill using the toolkit extension in 1.60.1 so I guess the extension was activated.

mtb3 commented 3 years ago

I'm also seeing this issue using VS Code 1.60.1 on macOS Big Sur, Version 11.5.2.

mcse3010 commented 3 years ago

Sounds like the ask vscode extension has not been activated? Could you verify if that is the case? Clicking on the alexa icon on the sidebar would activate the extension

Unfortunately, doing the same steps in both versions... in 1.59.1 it works, in 1.60+ it doesn't, so I'm guessing it is activated in both instances.

Shreyas-vgr commented 3 years ago

Created a fix to resolves this issue: PR #147 Will merge the changes soon.

mtb3 commented 3 years ago

@Shreyas-vgr Thank you for addressing this issue; we look forward to the PR being merged in.