[DiscordArchive] Are you on Windows? Linux?
[DiscordArchive] Are you on Windows? Linux?
Archived author: Anchy • Posted: 2023-01-11T10:45:57.046000+00:00
Original source
you can probably get away with just the manual setup
Archived author: Anchy • Posted: 2023-01-11T10:46:45.391000+00:00
Original source
**Manual way (crossplatform)**
Always make sure to use Debug or RelWithDebInfo compilation (in your CMake command) in order to get meaningful crash reports.
Create a file called gdb.conf with this inside:
```set logging on
set debug timestamp
run -c ../etc/worldserver.conf
bt
bt full
info thread
thread apply all backtrace full```
To debug or create a crashdump, you can then use the GDB command as described in its documentation:
```gdb -x gdb.conf --batch ./worldserver```
This command should be enough to both attach your IDE to debug your code and also generate a crashdump when the server crashes.
For a more advanced and "universal" restarter, personally I'm using PM2.
```pm2 start "gdb -x gdb.conf --batch ./worldserver"```
It should be enough to automatically restart, monitor, and utilize GDB with your server.
Archived author: EvilCalf • Posted: 2023-01-11T10:47:42.234000+00:00
Original source
thank you