vscode-azurefunctions icon indicating copy to clipboard operation
vscode-azurefunctions copied to clipboard

Add restart to the launch config for nodejs projects

Open nturinski opened this issue 3 years ago • 4 comments

Fixes https://github.com/microsoft/vscode-azurefunctions/issues/781 Fixes https://github.com/microsoft/vscode-azurestaticwebapps/issues/573

Tracking for Python: https://github.com/microsoft/vscode-python/issues/15431

We discussed offline if we should retroactively ask users to alter their launch configurations for them, but we decided it was probably going to annoy most current users rather than help them. It's pretty easy for a user to add the restart property to their own launch.json.

nturinski avatar Feb 19 '21 00:02 nturinski

@nturinski ping to check if there is any progress for this PR

stefanushinardi avatar Jul 12 '21 17:07 stefanushinardi

Using the latest func CLI tools (3.0.3477) and VS Code (1.58.0) I can confirm that this still doesn't work on MacOS. I need to investigate why this isn't working

nturinski avatar Jul 12 '21 19:07 nturinski

On Mac I'm only able to get "restart" to work when I run func start with the following arguments:

func start --javascript --language-worker -- "--inspect=9229"

edit: found another person who used this workaround/fix

alexweininger avatar Aug 30 '21 22:08 alexweininger

Confirmed that the workaround doesn't break anything on Windows as well though the command is func start --javascript --language-worker="--inspect=9229"

With this PR, we should change the func host start task to include those parameters so that "restart" will work on both Windows and Mac.

I'll have to do some more investigation, but we should probably omit the port number to the inspect flag. The port number can be whatever the user defines it to be, and I believe that there is logic in the extension to retrieve the port number dynamically.

I've confirmed that it works without it on Windows and this workaround didn't include it.

nturinski avatar Nov 10 '21 00:11 nturinski

Closing due to lack of activity.

nturinski avatar Nov 10 '22 22:11 nturinski