diff --git a/docs/app/guides/debugging.mdx b/docs/app/guides/debugging.mdx index 935a404867..6748a4c3d5 100644 --- a/docs/app/guides/debugging.mdx +++ b/docs/app/guides/debugging.mdx @@ -206,11 +206,27 @@ inline source maps, you will not see code frames. By default, Cypress will include an inline source map in your spec file, so you will get the most out of the error experience. If you [modify the preprocessor](/api/node-events/preprocessors-api), ensure that inline -source maps are enabled to get the same experience. With webpack and the -[webpack preprocessor](https://github.com/cypress-io/cypress/tree/develop/npm/webpack-preprocessor), -for example, set -[the `devtool` option](https://webpack.js.org/configuration/devtool/) to -`inline-source-map`. +source maps are enabled to get the same experience. Some examples of this include: + +- With webpack and the + [webpack preprocessor](https://github.com/cypress-io/cypress/tree/develop/npm/webpack-preprocessor), set + [the `devtool` option](https://webpack.js.org/configuration/devtool/) to + `inline-source-map`. +- With esbuild and the + [esbuild preprocessor](https://github.com/bahmutov/cypress-esbuild-preprocessor/tree/main), set + [the `sourcemap` option](https://esbuild.github.io/api/#sourcemap) to `inline` when + [creating the bundler](https://github.com/bahmutov/cypress-esbuild-preprocessor#esbuild-options). +- With cucumber and the + [cucumber preprocessor](https://github.com/badeball/cypress-cucumber-preprocessor/tree/master) + third party bundlers are used to bundle the code. + - For esbuild and the + [esbuild preprocessor](https://github.com/bahmutov/cypress-esbuild-preprocessor/tree/main), + set [the `sourcemap` option](https://esbuild.github.io/api/#sourcemap) to `inline` when + [creating the bundler](https://github.com/bahmutov/cypress-esbuild-preprocessor#esbuild-options). + Note: the cucumber preprocessor documentation for the esbuild bundler describes an experimental + option: `prettySourceMaps`, but this option is buggy and setting source maps on the esbuild + bundler directly works better. + - The other bundlers all default their source maps appropriately. ## Debugging flake