Skip to main content

📦 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.

情報

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.

スタンドアロンプラグインを使用する場合は、環境を確認することで同じ効果を得る必要があります。

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

バグを報告する場合、デプロイ設定をより簡単に検査できるように、おそらく本番環境でこのプラグインを有効にするようお願いすることになるでしょう。

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

インストール

npm install --save @docusaurus/plugin-debug
ヒント

If you use the preset @docusaurus/preset-classic, you don't need to install this plugin as a dependency.

You can configure this plugin through the preset options.

設定

このプラグインには現在オプションがありません。

Example configuration

このプラグインは、プリセットオプションまたはプラグインオプションを通じて設定できます。

ヒント

Most Docusaurus users configure this plugin through the preset options.

If you use a preset, configure this plugin through the preset options:

docusaurus.config.js
export default {
presets: [
[
'@docusaurus/preset-classic',
{
debug: true, // プラグインを本番で有効化
},
],
],
};