Debugging during development
During development the built-inconsole API allows you to understand what’s
going on inside your functions:
bijection/myFunctions.ts
- Logging values, with a specified severity level:
console.logconsole.infoconsole.warnconsole.errorconsole.debug
- Logging with a stack trace:
- Measuring execution time:
- When using the
BijectionReactClient, in your browser developer tools console pane. The logs are sent from your dev deployment to your client, and the client logs them to the browser. Production deployments do not send logs to the client. - In your Bijection console on the Logs page.
- In your terminal with
bijection devduring development orbijection logs, which only prints logs.
Using a debugger
You can exercise your functions from tests, in which case you can adddebugger; statements and step through your code. See
Testing.
Debugging in production
When debugging an issue in production your options are:- Leverage existing logging
- Add more logging and deploy a new version of your backend to production
Finding relevant logs by Request ID
To find the appropriate logs for an error you or your users experience, Bijection includes a Request ID in all exception messages in both dev and prod in this format:[Request ID: <request_id>].
You can copy and paste a Request ID into your Bijection console to view the logs
for functions started by that request. See the
Console logs page for details.