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

fix: updated debugAdapterPath to use pwa-node as node debug type #147

Merged
merged 2 commits into from
Sep 29, 2021

Conversation

Shreyas-vgr
Copy link
Contributor

  • fix: updated debugAdapterPath to use pwa-node as node debug type and added test cases

Description

On recent VsCode IDE update >v.1.60.* debugging configuration on node has changed
See Changelog and the node debugging configutations are of type: pwa-node.
Updated our extension codebase to reflect this change and added test cases.

Testing

  • npm run test success

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed
  • My commit message follows Conventional Commit Guideline

License

  • By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@ShenChen93 ShenChen93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you tested the local debug feature in both 1.60 and before 1.60 ? I wonder if we change the config, will people who use old version vscode can still use local debug ? If not probably we need to provide a separate config for after 1.60

@@ -216,7 +216,7 @@
"description": "Debugger configuration for Alexa skills (Node.js)",
"body": {
"name": "Debug Alexa Skill (Node.js)",
"type": "node",
"type": "pwa-node",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why it's pwa-node ? I didn't see it mentioned in the changelog. Does this type work for all Nodejs developers ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you tested the local debug feature in both 1.60 and before 1.60 ? I wonder if we change the config, will people who use old version vscode can still use local debug ? If not probably we need to provide a separate config for after 1.60

Yes tested with >v.1.60 with the changes and also launched a local debugging session on test skill to verify the fix.
Why do we need to test before v.1.60 ? Shouldn't we ask developers to update their IDE version its a minor release bump ??

Copy link
Contributor Author

@Shreyas-vgr Shreyas-vgr Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why it's pwa-node ? I didn't see it mentioned in the changelog. Does this type work for all Nodejs developers ?

Testing/debugging through the codebase here , type is returned as pwa-node instead of node on latest release.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, just wonder if this value will change on different test environment, like different node version, different vscode version

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what's the best practice for us if the behavior is different for developers use old version IDE.

If this change will break exsiting developers on old version ide, then it will be a breaking change right ? Like develoepr may have some reasons to use old version IDE, and I think we'd better not break them ? Just my personal thoughts, we can have some discuss within team and see what others think if it's the case

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested node v12 and v14 and also previous builds on VsCode IDE (v.1.58 and v1.59) and the change pwa-node works since it was available as preview mode. So we should be good to update our Configs as well. :)
Thanks for pointing it out @ShenChen-Amazon !

if (!aplPreviewPanel || !aplPreviewPanel.visible) {
throw loggableAskError(ERROR_MESSAGES.CHANGE_VIEWPORT_PROFILE_NO_APL_PREVIEW, undefined, true);
if (aplPreviewPanel === undefined || !aplPreviewPanel.visible) {
throw logAskError(ERROR_MESSAGES.CHANGE_VIEWPORT_PROFILE_NO_APL_PREVIEW, undefined, true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change loggableAskError to logAskError in this PR ?

Copy link
Contributor Author

@Shreyas-vgr Shreyas-vgr Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was causing spellCheck errors, so refactored(renamed) it to logAskError any issue on changing ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not clear the differences between these two. I think would be great if you could dig into them and find the differences ?

Copy link
Contributor

@ShenChen93 ShenChen93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Synced with Shreyas offline and no more concerns. Thx Shreyas for the fix !

@sjcomstock67
Copy link

Sorry - hit wrong button and lost Shen's approval. But looks good to me as well.

@Shreyas-vgr Shreyas-vgr merged commit 834c67b into development Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants