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

F5 doesn't work on Node <v8.0 #1

Closed
ejizba opened this issue Sep 27, 2017 · 9 comments
Closed

F5 doesn't work on Node <v8.0 #1

ejizba opened this issue Sep 27, 2017 · 9 comments
Labels
Milestone

Comments

@ejizba
Copy link
Contributor

ejizba commented Sep 27, 2017

Today we're hard-coding the debug protocol to be 'inspector' which only works on Node 8.0+.

Ideally we remove the protocol and VSCode auto-detects whether it needs to use "legacy" or "inspector" protocol - however that wasn't working for me on Node 8.0+
screen shot 2017-10-05 at 1 51 57 pm

VSCode checks this url to detect the version http://localhost:5858/json/version. It's possible that url isn't up until after Job host started is printed.

This could also be related (the func cli does not use the default 9229 port for debugging v8.0+): Azure/azure-functions-core-tools#261

@ejizba ejizba added the bug label Oct 11, 2017
@jdneo
Copy link
Member

jdneo commented Nov 8, 2017

I can repro this issue when I do the following actions:

  1. trigger the 'add function' command, select a folder that is not inited (Let's say an empty folder).
  2. after the function file is added, open that folder
  3. hit F5

Though I'm not 100% sure, I guess it is because in this line: https://github.com/Microsoft/vscode-azurefunctions/blob/master/src/commands/createFunction.ts#L52, we just call method in FunctionsCli, so the .vscode setting folder is generated by the function CLI not by the extension, so the preLaunchTask is not get executed since there is no task.json at all.

@auchenberg
Copy link

Our Node debugger will auto detect the protocol if you set protocol: 'auto' and remove the port when launching.

@ejizba
Copy link
Contributor Author

ejizba commented Nov 8, 2017

@auchenberg when you say 'our' are you talking about 'VS Code'? This issue is not in VS Code (I've tried what you suggested), it's in the func cli.

This url is not ready in time for VS Code to 'auto' detect the protocol: http://localhost:5858/json/version

@ejizba
Copy link
Contributor Author

ejizba commented Nov 8, 2017

We call 'func host start', which is basically a black box that starts the node process for us

@auchenberg
Copy link

@EricJizbaMSFT Yes I mean "our " as in "our VS Code debugger" in case you didn't know that we supported protocol detection.

@ejizba ejizba modified the milestones: future, 0.3.0 Nov 9, 2017
@jdneo
Copy link
Member

jdneo commented Nov 10, 2017

F5 seems not work on VS Code 1.18.

image

Note sure if it is related to my own environment setting.

@ejizba
Copy link
Contributor Author

ejizba commented Nov 10, 2017

The error in your window says "No job functions found". You have to create a function before you F5

@jdneo
Copy link
Member

jdneo commented Nov 10, 2017

Ha, sorry, my bad

@ejizba
Copy link
Contributor Author

ejizba commented Nov 28, 2017

Since creating this issue, Node 8.0+ has become the LTS release. We will no longer fix this issue.

As a workaround for old versions of Node, users can manually remove protocol: 'inspector', from their .vscode/launch.json file after creating a new project.

@ejizba ejizba closed this as completed Nov 28, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants