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

Add remote debugging support for Node.js on Linux App Service plans #1458

Merged
merged 3 commits into from
Sep 4, 2019

Conversation

mrcrane
Copy link
Contributor

@mrcrane mrcrane commented Aug 20, 2019

This will address #1344 and it is the culmination of the refactoring work already done in microsoft/vscode-azuretools#522 and microsoft/vscode-azureappservice#1045

Given that the refactoring has already been done, this code is fairly straightforward. The main concern is around the fact that there is already a feature in place that supports Java remote debugging on Windows.

A few months ago (sorry for the delay) @fiveisprime @nturinski and I discussed this issue and we decided to go with 2 different remote debugging feature flags so that we can maintain both experiences for the time being. Since we expect this Node.js experience to be the main experience moving forward, I have reappropriated the enableRemoteDebugging flag (Python support is coming soon). Java debugging support will now be enabled using enableJavaRemoteDebugging. The settings page will now look like:

image

I'm happy to hear any feedback on how to make that experience less confusing.

More notes:

  • Kudu is not available on Linux consumption, so we are still working with the Functions team to understand how this will work for that use case. Without Kudu we will likely need a new solution alongside this one.
  • I have tested the Java remote debugging experience with this new code and it is still working
  • Other than changing the feature flag, I have left the Java debugging experience untouched. It still uses the "Attach Debugger" wording unlike the "Start Remote Debugging" that we use for the App Service experience.
  • In order to get Java debugging working with the new remote debugging code we would need the new tunneling API to be ported to Windows (it is currently Linux-only) and the Java runtime to respect the remoteDebuggingEnabled setting. This is feasible but probably low priority.

@mrcrane mrcrane requested a review from a team as a code owner August 20, 2019 19:32
return;
}

throw new Error('Azure Remote Debugging is currently only supported for Node.js Function Apps running on Linux App Service plans.');
Copy link
Contributor

Choose a reason for hiding this comment

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

Based on the PR description - this only works on dedicated plans? I feel like that should be highlighted in the messaging since consumption is so much more popular

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes this only works on dedicated plans so far. I have tried to highlight that in all of the messaging, including this error message:

Azure Remote Debugging is currently only supported for Node.js Function Apps running on Linux App Service plans.

All of the Azure Portal UI I have seen refers to dedicated plans as App Service plans, so I am trying to use that same terminology. For example, in the UI to create a Function App:
image

I'm happy to update the messaging if you have a suggestion about how to improve it. @fiveisprime Any thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah didn't realize you were using "App Service Plan" to differentiate. I see what you mean about the dropdown, but even the portal is inconsistent. It lists consumption plans as app service plans (after creating):
Screen Shot 2019-08-26 at 11 43 14 AM

What about something like this:

Azure Remote Debugging is currently only supported for Node.js Function Apps running on Linux App Service plans (excluding consumption plans).

I know it's kinda ugly, but again it seems like a super important distinction since the majority of plans will be consumption.

We could also consider splitting the message out into separate cases:

  • Remote Debugging is currently only supported for Linux Function Apps.
  • Remote Debugging is currently only supported for Node.js Function Apps.
  • Remote Debugging is currently not supported for Function Apps running on consumption plans.

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 looked into the conditional messaging approach but I wasn't able to find a good solution.

I went ahead and changed the messaging to be very clear, for this message and also for the description of the feature flag. Let me know what you think.

@mrcrane mrcrane force-pushed the remote-debug-node branch from 51e9b52 to 46d641a Compare August 30, 2019 17:00
@mrcrane
Copy link
Contributor Author

mrcrane commented Aug 30, 2019

I rebased on master and force-pushed to resolve merge conflicts.

@ejizba ejizba merged commit 58bef37 into microsoft:master Sep 4, 2019
@ejizba
Copy link
Contributor

ejizba commented Sep 4, 2019

Thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Jan 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants