3 ms·
How do you guys debug serverless functions?
Having a hard time trying to debug my serverless functions, other than just deploying them on Vercel and waiting to test on the client. Especially challenging because they run on DB triggers... not sure if there is a better way? Anyone knows?
- PaulHoule 1y ago(1) logs, (2) keep it simple, (3) have a good test harness
- trunci 1y agoI feel that for small changes that's fine, but for testing and building functions from the ground up that's still hard
- 1oooqooq 1y agoclassical case of: reached the time to pay that tech debit. you're pushing code you cannot test and debug on a local env, which you should have had before your first prod push.
- mmarian 1y agoBest way is to add unit tests. Next best is to have a test environment. Don't recommend service tests with test containers, too complicated.