npm install @csstools/postcss-debug-logger --save-dev
PostCSS Debug Logger logs the AST nodes PostCSS is processing.
This is mainly useful to track down infinite loops in PostCSS plugins.
Add PostCSS Debug Logger to your project:
npm install postcss @csstools/postcss-debug-logger --save-dev
Use it as a PostCSS plugin:
const postcss = require('postcss');
const postcssDebugLogger = require('@csstools/postcss-debug-logger');
postcss([
postcssDebugLogger(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);
PostCSS Debug Logger runs in all Node environments, with special instructions for: