Skip to content

Commit

Permalink
Update debugger.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Jun 18, 2024
1 parent 3493dc6 commit 0189dbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/runtime/debugger.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ That's why when you log `error.stack` in Bun, the formatting of `error.stack` is

Bun implements the [V8 Stack Trace API](https://v8.dev/docs/stack-trace-api), which is a set of functions that allow you to manipulate stack traces.

##### `Error.prepareStackTrace`
##### Error.prepareStackTrace

```ts
Error.prepareStackTrace = (err, stack) => {
Expand All @@ -231,7 +231,7 @@ console.log(err.stack);

This formerly V8-only API lets you customize the stack trace output by providing a custom `prepareStackTrace` function on the `Error` object. This function is called with the error object and an array of `CallSite` objects and lets you return a custom stack trace.

##### `Error.captureStackTrace(error, startFn)`
##### Error.captureStackTrace(error, startFn)

The `Error.captureStackTrace` lets you capture a stack trace at a specific point in your code, rather than at the point where the error was thrown.

Expand Down

0 comments on commit 0189dbb

Please sign in to comment.