# Debugging wishlist

**URL:** <https://forum.serverless.com/t/debugging-wishlist/1128>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [January 17, 2017, 2:48am UTC](https://forum.serverless.com/t/debugging-wishlist/1128 "2017-01-17T02:48:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hendry](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/hendry/32/343_2.png) [@hendry](https://forum.serverless.com/u/hendry)\
**Post date:** [January 17, 2017, 2:48am UTC](https://forum.serverless.com/t/debugging-wishlist/1128/1 "2017-01-17T02:48:44Z")

</div>

I’ve just discovered [https://serverless.com/framework/docs/providers/aws/cli-reference/invoke-local/#invoke-local](https://serverless.com/framework/docs/providers/aws/cli-reference/invoke-local/#invoke-local) which should be linked from [https://github.com/serverless/serverless/issues/281](https://github.com/serverless/serverless/issues/281) & their should be a topic called **debug** upon [https://serverless.com/framework/docs/](https://serverless.com/framework/docs/) referring to this.

But frustratingly what local invoking doesn’t do, is stepping through your code and inspect variables etc etc. That to me seems sorely missing. 😭

Furthermore I find that especially once deployed to production, it’s VERY handy to have copies of the input event.json to re-run / re-create / reproduce issues locally in development. Short of developing this functionality everytime I write a lambda function, could there be some trick I am missing?

---

<div class="post-metadata">

**Author:** ![buggy](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/buggy/32/177_2.png) [@buggy](https://forum.serverless.com/u/buggy)\
**Post date:** [January 17, 2017, 4:18am UTC](https://forum.serverless.com/t/debugging-wishlist/1128/2 "2017-01-17T04:18:35Z")

</div>

> [@hendry](#):
>
> Furthermore I find that especially once deployed to production, it’s VERY handy to have copies of the input event.json to re-run / re-create / reproduce issues locally in development. Short of developing this functionality everytime I write a lambda function, could there be some trick I am missing?

If you want production to save copies of the input event for each request you can simply log the event to Cloud Watch.

```javascript
console.log("Event", event);

```

Then you can copy the event from Cloud Watch to event.json to test locally.

---

<div class="post-metadata">

**Author:** ![hendry](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/hendry/32/343_2.png) [@hendry](https://forum.serverless.com/u/hendry)\
**Post date:** [January 17, 2017, 6:46am UTC](https://forum.serverless.com/t/debugging-wishlist/1128/3 "2017-01-17T06:46:06Z")

</div>

True, thanks for the tip. Though would be nice if there was some convenience function since copy/pastes can be fiddly.

Btw, what about a “debugging JS” story? 🙂
