Skip to content

fix: patching debugging docs #420

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

Merged
merged 1 commit into from
Feb 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ npm install @google-cloud/functions-framework
3. Run `node`, enable the inspector and run the Functions Framework:

```sh
node --inspect node_modules/@google-cloud/functions-framework --target=helloWorld
node --inspect node_modules/.bin/functions-framework --target=helloWorld
...
Debugger listening on ws://127.0.0.1:9229/5f57f5e9-ea4b-43ce-be1d-6e9b838ade4a
For help see https://nodejs.org/en/docs/inspector
Expand All @@ -28,4 +28,6 @@ Function: helloWorld
URL: http://localhost:8080/
```

> Note that the [symlinked executable](https://docs.npmjs.com/cli/v8/configuring-npm/folders#executables) of the function framework in node_modules/**.bin**/functions-framework is used to direct the debugger to the necessary entrypoint.

You can now use an IDE or other tooling to add breakpoints, step through your code and debug your function.