Skip to content

Commit

Permalink
fix: patching debugging docs (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
cstanger committed Feb 1, 2022
1 parent 15cd2be commit f822f3e
Showing 1 changed file with 3 additions and 1 deletion.
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.

0 comments on commit f822f3e

Please sign in to comment.