Improved debug documentation.
Ylian Saint-Hilaire committed
Sep 15, 2024 at 09:40 UTC
2f34b7e83bdffece29c70b94135a27068615f069
1 file changed
+41
-2
docs/docs/meshcentral/debugging.md
+41
-2
@@ -92,14 +92,53 @@ In general the problem is that you are running two MeshCentral instances at the
92
93
### Running Meshcentral server in debug mode
94
95
+Debug more will cause MeshCentral to output a lot of debug messages to the console. To display all debug messages, run MeshCentral like this:
96
+
97
```bash
98
node node_modules/meshcentral --debug
99
```
100
99
-### Enabling trace in your browser Dev Tools
101
+A more practical way to run the debug command it to specify what messages you want printed out using a comma seperated list, for example:
102
+
103
+```bash
104
+node node_modules/meshcentral --debug web,amt,mps
105
+```
106
+
107
+Here is the list of all debug options:
108
+
109
+```
110
+cookie - Cookie encoder
111
+dispatch - Message Dispatcher
112
+main - Main Server Messages
113
+peer - MeshCentral Server Peering
114
+agent - MeshAgent traffic
115
+agentupdate - MeshAgent update
116
+cert - Server Certificate
117
+db - Server Database
118
+email - Email/SMS/Push Traffic
119
+web - Web Server
120
+webrequest - Web Server Requests
121
+relay - Web Socket Relay
122
+httpheaders - Web Server HTTP Headers
123
+authlog - User Authentication Log
124
+amt - Intel AMT
125
+webrelay - Connection Relay
126
+mps - CIRA Server
127
+mpscmd - CIRA Server Commands
128
+```
129
+
130
+You can also specify the `debug` option in the config.json file in the `settings` section. For example:
131
+
132
+```
133
+"settings": {
134
+ "debug": "web,amt,mps"
135
+}
136
+```
137
101
-`Trace=1` as a parameter in chrome dev tools for debugging
138
139
+### Enabling trace in your browser Dev Tools
140
+
141
+You can enable browser console tracing by adding `trace=1` as a parameter to the URL of the MeshCentral main web page. For example `https://myserver.com/?trace=1`. Once present, open the browser's console window to see all web client tracing messages.
142
143
To log all database queries, change log_statement in /etc/postgresql/13/main/postgresql.conf
144