Skip to content

Commit 4c5757b

Browse files
authored
docs: add debug part (#3739)
1 parent 677aac9 commit 4c5757b

File tree

20 files changed

+1869
-12
lines changed

20 files changed

+1869
-12
lines changed

apps/website-new/docs/en/guide/_meta.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
"name": "framework",
1515
"label": "Frameworks"
1616
},
17+
{
18+
"type": "dir",
19+
"name": "debug",
20+
"label": "Debug"
21+
},
1722
{
1823
"type":"dir",
1924
"name":"troubleshooting",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
["runtime", "rsbuild", "rspack", "webpack", "vite", "chrome-devtool", "type-prompt","cli"]
1+
["runtime", "rsbuild", "rspack", "webpack", "vite", "type-prompt","cli"]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[ "mode","chrome-devtool","variables"]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Enable debug mode
2+
3+
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.
4+
5+
Build and add environment variables:
6+
7+
```bash
8+
# Debug development mode
9+
FEDERATION_DEBUG=true pnpm dev
10+
11+
# Debug production mode
12+
FEDERATION_DEBUG=true pnpm build
13+
```
14+
15+
Runtime and add environment variables:
16+
17+
```
18+
localStorage.setItem('FEDERATION_DEBUG','true')
19+
```
20+
21+
## Log information
22+
23+
After enabling debug mode, you can see the following information in the console:
24+
25+
In debug mode, you will see some logs starting with `[ Module Federation ]` output in the terminal.

0 commit comments

Comments
 (0)