Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Environment variables

CodeTracer exposes a number of environment variables that you can use to override some of its behaviours:

for many of the flags, we expect "1" to enable them

  1. CODETRACER_ELECTRON_ARGS - adds arguments for launching Electron. Useful for debugging production builds
  2. CODETRACER_WRAPPER_PID - overrides the process ID of the ct CodeTracer wrapper
  3. CODETRACER_CALLTRACE_MODE - changes the calltrace mode
  4. CODETRACER_RECORD_CORE - this does nothing as it is only related to the unreleased system backend
  5. CODETRACER_SHELL_SOCKET - this sets the socket path for sending events to the CI integration from ct record(or eventually ct shell)
  6. CODETRACER_SHELL_ADDRESS - this sets the address for sending events to the CI integration from ct record(or eventually ct shell)
  7. CODETRACER_SHELL_EXPORT - this enables export mode for ct record on: exporting the traces into zip files in the folder that is the value of this env variables; (similarly to the ct record -e=<zippath> option, but for all records while the variable is enabled). The trace archives try to use a globally unique id in their filenames, from std/oids in the nim stdlib: https://nim-lang.org/docs/oids.html
  8. CODETRACER_DEBUG_CURL - if "1", print debug output for the raw objects sent with curl for the CI integration from ct record(or eventually ct shell)

CodeTracer Shell

These are generally not functional right now, since they affect CodeTracer Shell, which is currently not stable/in very prototypical state:

  1. CODETRACER_SHELL_BASH_LOG_FILE - overrides the log file
  2. CODETRACER_SHELL_ID - overrides the shell ID
  3. CODETRACER_SESSION_ID - overrides the CodeTracer Shell session ID so that the current commands affect a previous shell session
  4. CODETRACER_SHELL_REPORT_FILE - overrides the report file of CodeTracer Shell
  5. CODETRACER_SHELL_USE_SCRIPT - ?
  6. CODETRACER_SHELL_RECORDS_OUTPUT - ?
  7. CODETRACER_SHELL_CLEANUP_OUTPUT_FOLDER - ?