Crash Detection

Configure Sentry crash reporting in S2-Launcher to send crash dumps with the console output and Plugify log messages.

S2-Launcher has built-in Sentry crash reporting. When it is turned on, a crash sends a crash dump to your Sentry project, together with the recent console output of the game. Sentry is off by default and is turned on in sentry.jsonc. It also stays off while a debugger is attached to the process.

Configuration

sentry.jsonc lies next to the launcher and crashpad_handler:

  • Windows: game/bin/win64/sentry.jsonc
  • Linux: game/bin/linuxsteamrt64/sentry.jsonc

The host reads it on start. Keep the file in place even with Sentry off: without it the Launcher doesn't start, and with the Runtime the server starts without Plugify.

To turn reporting on, set enabled and your DSN from Project Settings → Client Keys (DSN) on sentry.io:

"dsn": "https://<key>@<org>.ingest.sentry.io/<project>",
"enabled": true

What gets reported

  • Crash dump: a minidump of the process, in the Issues of your Sentry project.
  • Console output: the recent output of the game console, as the message of the event.
  • Plugify log messages: with "logs_with_breadcrumbs": true, the latest messages of the Plugify log are attached as breadcrumbs, with the module, file and function that wrote them. max_breadcrumbs limits how many are kept.
  • Session log: with "listen_console": true, the console output is also written to session.log in logs_path.
  • Attachments: the files listed in attachments.

The file as shipped

Paths in the file are relative to the folder of the file. Options in comments are turned off and can be uncommented.

{
  // Required: Sentry DSN (Data Source Name)
  "dsn": "https://your-sentry-dsn@sentry.io/your-project-id",

  // Required: Directory paths
  "database_path": "../../csgo/addons/plugify/crashes",
  "logs_path": "../../csgo/addons/plugify/logs/sessions",

  // Basic release identification
  "environment": "production",
  "release": "2.5.6",

  // Custom tags
  "tags": {
    "product": "Plugify S2 Launcher",
    "version": "2.5.6",
    "game": "csgo"
  },

  // Custom attachments
  "attachments": [
  ],

  // Sampling rate (0.0 to 1.0)
  "sample_rate": 1.0,

  // Debug and logging
  "debug": false,
  "listen_console": false,

  // Enable/disable Sentry
  "enabled": false,

  // Advanced options (uncomment to use):

  // Release distribution identifier
  // "dist": "",

  // Network configuration
  // "proxy": "",
  // "ca_certs": "",
  // "transport_thread_name": "",

  // Custom handler path (defaults to crashpad_handler if not specified)
  // "handler_path": "",

  // Tracing sample rate (0.0 to 1.0)
  // "traces_sample_rate": 0.0,

  // Limits
  // "max_breadcrumbs": 100,
  // "max_spans": 1000,
  // "shutdown_timeout": 2000,

  // Logging options
  // "enable_logging_when_crashed": true,
  // "logger_level": "debug",

  // Session tracking
  "auto_session_tracking": true,
  // "require_user_consent": false,

  // Stack trace processing
  "symbolize_stacktraces": true,

  // Crash reporter options
  // "system_crash_reporter_enabled": false,
  // "crashpad_wait_for_upload": false,
  // "crashpad_limit_stack_capture_to_sp": false,

  // Additional features
  // "attach_screenshot": false,
  // "propagate_traceparent": false,

  // Logging integration
  // "enable_logs": false,
  // "logs_with_attributes": false,
  // "logs_with_breadcrumbs": false
}

Main options

OptionDefaultDescription
enabledfalseTurns reporting on.
dsnplaceholderDSN of your Sentry project. Required when enabled is true.
database_path../../csgo/addons/plugify/crashesWhere crash dumps are kept before upload. Created if missing.
logs_path../../csgo/addons/plugify/logs/sessionsFolder of session.log.
listen_consolefalseWrites the console output to session.log.
logs_with_breadcrumbsfalseAttaches the latest Plugify log messages to a crash as breadcrumbs.
max_breadcrumbs100How many breadcrumbs are kept.
sample_rate1.0Share of events to send, from 0.0 to 1.0.
symbolize_stacktracestrueResolves addresses in stack traces into function names.
auto_session_trackingtrueTracks healthy and crashed sessions in Sentry.
debugfalseVerbose output of the Sentry SDK, for troubleshooting.

Troubleshooting

  1. Crashes don't reach Sentry:
    • Check that "enabled": true is set and the DSN is correct.
    • Check that crashpad_handler.exe (Windows) or crashpad_handler (Linux) lies next to the launcher, or set its path in handler_path.
    • Check that the process isn't started under a debugger.
  2. No breadcrumbs: set "logs_with_breadcrumbs": true.
  3. Crash dumps are not written: check that the process may write to database_path.