You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- TODO: Deploy to Cloud Run [#28](https://github.com/GoogleCloudPlatform/functions-framework-nodejs/pull/28)
8
-
- TODO: Local Debug [#15](https://github.com/GoogleCloudPlatform/functions-framework-nodejs/issues/15)
8
+
9
+
## Debugging functions
10
+
11
+
The Functions Framework works with standard tooling that you might use when writing a function for a Node.js environment. You can attach a debugger to your function by following these steps.
12
+
13
+
1. Write an `index.js` file containing your Node.js function:
14
+
15
+
```js
16
+
exports.helloWorld= (req, res) => {
17
+
res.send('Hello, World');
18
+
};
19
+
```
20
+
21
+
2. Install the Functions Framework:
22
+
23
+
```sh
24
+
npm install @google-cloud/functions-framework
25
+
```
26
+
27
+
3. Run `node`, enable the inspector and run the Functions Framework:
0 commit comments