logologo
Guide
Practice
Configuration
Plugins
Showcase
Blog
Ecosystem
Module Federation Examples
Practical Module Federation
Zephyr Cloud
Nx
简体中文
English
Guide
Practice
Configuration
Plugins
Showcase
Blog
Module Federation Examples
Practical Module Federation
Zephyr Cloud
Nx
简体中文
English
logologo

Getting Started

Introduction
Setting Up the Environment
Quick Start Guide
Feature Navigation
Glossary of Terms
npm Packages

basic

Runtime

Runtime Access
Runtime API
Runtime Hooks
Rsbuild Plugin
Rspack Plugin
Webpack Plugin
Rspress Plugin
Vite Plugin
Metro
Type Hinting
Command Line Tool
Style Isolation

Data Solution

Data Fetching
Data Caching
Prefetch

Frameworks

Modern.js
Next.js

Deployment

Deploy with Zephyr Cloud

Debug

Enable debug mode
Chrome DevTools
Global variables

Troubleshooting

Overview

Runtime

RUNTIME-001
RUNTIME-002
RUNTIME-003
RUNTIME-004
RUNTIME-005
RUNTIME-006
RUNTIME-007
RUNTIME-008
RUNTIME-009

Build

BUILD-001
BUILD-002

Type

Overview
TYPE-001
Other
Edit this page on GitHub
Previous PageDeploy with Zephyr Cloud
Next PageChrome DevTools

#Enable debug mode

To facilitate troubleshooting, Module Federation provides a debug mode. You can add the FEDERATION_DEBUG=true environment variable when executing a build or execute localStorage.setItem('FEDERATION_DEBUG','true') in the browser to enable the debug mode of Module Federation.

Build and add environment variables:

# Debug development mode
FEDERATION_DEBUG=true pnpm dev

# Debug production mode
FEDERATION_DEBUG=true pnpm build

Runtime and add environment variables:

localStorage.setItem('FEDERATION_DEBUG','true')

#Log information

After enabling debug mode, you can see the following information in the console:

In debug mode, you will see some logs starting with [ Module Federation ] output in the terminal.