Debug mode
Rsbuild provides a debug mode to troubleshoot problems. Add the DEBUG=rsbuild environment variable when you run a build to enable it.
In debug mode, Rsbuild prints additional log information and writes the Rsbuild and Rspack configs to the dist directory so you can inspect them.
Log information
In debug mode, the terminal shows logs that start with rsbuild, including internal operations and the Rspack version in use.
Rsbuild also prints the following message to indicate that it has written the generated build configurations to disk. Open these files to review the contents.
Rsbuild config file
In debug mode, Rsbuild automatically generates a dist/.rsbuild/rsbuild.config.mjs file that contains the final Rsbuild config after the framework finishes processing your settings.
The structure of the file is as follows:
For a complete introduction to Rsbuild config, please see the Configure Rsbuild chapter.
Rspack config file
Rsbuild also creates a dist/.rsbuild/rspack.config.web.mjs file with the final Rspack config that Rsbuild passes to Rspack.
The structure of the file is as follows:
For a complete introduction to Rspack configs, please see Rspack official documentation.

