-
Notifications
You must be signed in to change notification settings - Fork 138
Update debug config for node projects due to breaking changes #478
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
Conversation
@@ -0,0 +1,22 @@ | |||
# Breaking changes to JavaScript Debug Configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this mention JavaScript?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think so. C# wasn't affected. Python isn't supported by this extension yet. And these instructions don't work for Java (The partner team is handling Java support and I think they fixed everything directly in Maven. In any case, we can always change this after the fact to include Java since the aka.ms link will point directly to master)
docs/debugConfig.md
Outdated
|
||
The first option is to add the following to your `runFunctionsHost` task in `.vscode\tasks.json`: | ||
|
||
```json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's really helpful to see the entire task (even if just an example).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
identifier: funcHostTaskId, | ||
type: 'shell', | ||
command: 'func host start', | ||
options: options, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this can return
options: undefined
is that okay?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. 'undefined' values are excluded when stringifying JSON, which is what we want in this case
* JavaScript debugging in the func cli had breaking changes in v2.0.1-beta.30. This verifies users are up-to-date with the latest working debug config. | ||
* See https://aka.ms/AA1vrxa for more info | ||
*/ | ||
async function verifyDebugConfigIsValid(folderPath: string, actionContext: IActionContext): Promise<void> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to guard against this function throwing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point
Fixes #475
See the docs page that I added for more information. New projects should work going forward. Old projects will see this dialog:

And the following if they decide to update:

I implemented Option 1 from my docs page. It's technically just a workaround, but it's better because it only changes 1 file that is tracked by git. I thought about implementing both option 1 and option 2, but ultimately decided that wasn't worth it since option 2 is still not finalized (according to Azure/azure-functions-host#3120).