Skip to content

Commit

Permalink
Improved debug documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ylianst committed Sep 15, 2024
1 parent 4d5ec6c commit 2f34b7e
Showing 1 changed file with 41 additions and 2 deletions.
43 changes: 41 additions & 2 deletions docs/docs/meshcentral/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

### Enabling trace in your browser Dev Tools
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"
}
```

`Trace=1` as a parameter in chrome dev tools for debugging

### Enabling trace in your browser Dev Tools

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

Expand Down

0 comments on commit 2f34b7e

Please sign in to comment.