๋ฉ”์ธ ์ปจํ…์ธ ๋กœ ์ด๋™
๋ฒ„์ „: 2.x

๐Ÿ“ฆ 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
module.exports = {
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.

Installationโ€‹

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.

Configurationโ€‹

ํ•ด๋‹น ํ”Œ๋Ÿฌ๊ทธ์ธ์€ ํ˜„์žฌ ์˜ต์…˜์„ ๊ฐ€์ง€๊ณ  ์žˆ์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

Example configurationโ€‹

ํ”„๋ฆฌ์…‹ ์˜ต์…˜์ด๋‚˜ ํ”Œ๋Ÿฌ๊ทธ์ธ ์˜ต์…˜์—์„œ ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํŒ

๋Œ€๋ถ€๋ถ„์˜ ๋„ํ์‚ฌ์šฐ๋ฃจ์Šค ์‚ฌ์šฉ์ž๋Š” ํ”„๋ฆฌ์…‹ ์˜ต์…˜์„ ์‚ฌ์šฉํ•ด ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.

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

docusaurus.config.js
module.exports = {
presets: [
[
'@docusaurus/preset-classic',
{
debug: true, // This will enable the plugin in production
},
],
],
};