GoogleCloudPlatform / functions-framework-nodejs

FaaS (Function as a service) framework for writing portable Node.js functions
Apache License 2.0
1.3k stars 160 forks source link

docs: improve docs using npx for debugging #429

Closed grant closed 2 years ago

grant commented 2 years ago

Uses npx for the debugging docs. Might help with windows users. Using the .bin folder directly seem finicky.

See: https://github.com/GoogleCloudPlatform/functions-framework-nodejs/issues/15#issuecomment-1036834366

Tested locally with the debugging docs:

npx --node-options=--inspect @google-cloud/functions-framework --target=helloWorld
Debugger listening on ws://127.0.0.1:9229/0f8f426d-8456-453d-887b-e34612cc872f
For help, see: https://nodejs.org/en/docs/inspector
Serving function...
Function: helloWorld
Signature type: http
URL: http://localhost:8080/
grant commented 2 years ago

@matthewrobertson PTAL?

This should be a very small docs change.

grant commented 2 years ago

For VS Code the npx command does not trigger the IDE Debugging mode. Therefore, I would suggest keeping it with the "node" command

Sounds good. If folks have issues still, they can create a bug. Closing.