Skip to main content
Version: Canary 🚧

📦 plugin-debug

The debug plugin will display useful debug information at http://localhost:3000/__docusaurus/debug.

It is mostly useful for plugin authors, that will be able to inspect more easily the content of the .docusaurus folder (like the creates routes), but also be able to inspect data structures that are never written to disk, like the plugin data loaded through the contentLoaded lifecycle.

info

If you use the plugin via the classic preset, the preset will enable the plugin in development and disable it in production by default (debug: undefined) to avoid exposing potentially sensitive information. You can use debug: true to always enable it or debug: false to always disable it.

If you use a standalone plugin, you may need to achieve the same effect by checking the environment:

docusaurus.config.js
export default {
plugins: [
process.env.NODE_ENV !== 'production' && '@docusaurus/plugin-debug',
].filter(Boolean),
};
note

Se você relatar um bug, provavelmente pediremos que este plugin seja ativado na produção, para que possamos inspecionar sua configuração de implantação com mais facilidade.

If you don't have any sensitive information, you can keep it on in production like we do.

Instalação

npm install --save