Improved debug documentation.

This commit is contained in:
Ylian Saint-Hilaire 2024-09-15 09:40:36 -07:00
parent 4d5ec6cac1
commit 2f34b7e83b

View File

@ -92,14 +92,53 @@ In general the problem is that you are running two MeshCentral instances at the
### Running Meshcentral server in debug mode
Debug more will cause MeshCentral to output a lot of debug messages to the console. To display all debug messages, run MeshCentral like this:
```bash
node node_modules/meshcentral --debug
```
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:
```bash
node node_modules/meshcentral --debug web,amt,mps
```
Here is the list of all debug options:
```
cookie - Cookie encoder
dispatch - Message Dispatcher
main - Main Server Messages
peer - MeshCentral Server Peering
agent - MeshAgent traffic
agentupdate - MeshAgent update
cert - Server Certificate
db - Server Database
email - Email/SMS/Push Traffic
web - Web Server
webrequest - Web Server Requests
relay - Web Socket Relay
httpheaders - Web Server HTTP Headers
authlog - User Authentication Log
amt - Intel AMT
webrelay - Connection Relay
mps - CIRA Server
mpscmd - CIRA Server Commands
```
You can also specify the `debug` option in the config.json file in the `settings` section. For example:
```
"settings": {
"debug": "web,amt,mps"
}
```
### Enabling trace in your browser Dev Tools
`Trace=1` as a parameter in chrome dev tools for debugging
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.
To log all database queries, change log_statement in /etc/postgresql/13/main/postgresql.conf