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
CODETRACER_ELECTRON_ARGS- adds arguments for launching Electron. Useful for debugging production buildsCODETRACER_WRAPPER_PID- overrides the process ID of thectCodeTracer wrapperCODETRACER_CALLTRACE_MODE- changes the calltrace modeCODETRACER_RECORD_CORE- this does nothing as it is only related to the unreleased system backendCODETRACER_SHELL_SOCKET- this sets the socket path for sending events to the CI integration fromct record(or eventuallyct shell)CODETRACER_SHELL_ADDRESS- this sets the address for sending events to the CI integration fromct record(or eventuallyct shell)CODETRACER_SHELL_EXPORT- this enables export mode forct recordon: exporting the traces into zip files in the folder that is the value of this env variables; (similarly to thect 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, fromstd/oidsin the nim stdlib: https://nim-lang.org/docs/oids.htmlCODETRACER_DEBUG_CURL- if "1", print debug output for the raw objects sent with curl for the CI integration fromct record(or eventuallyct shell)CODETRACER_DEBUG_CT_REMOTE- if "1", print debug output(for now process command name and arguments) for the trace sharing code and commands that callct-remote(desktopclient), e.g.ct upload,ct download,ct login,ct set-default-orgCODETRACER_RR_SOFT_MODE- if we are using therr.softpatch in therrused byct: if "1", runsrr recordandrr replaywith-Wflag ofrr.soft: software counters/dynamic instrumentation. rr.soft is https://github.com/sidkshatriya/rr.softCODETRACER_RECORD_BACKEND- this is a newer version ofCODETRACER_RECORD_CORE: if set, and ifctis in PATH, lets you record the internal db-backend process when doingct replay
e.g.env CODETRACER_RECORD_BACKEND=1 ct replay db-trace
there might be problem if you try to replay a rr trace and record that:
it seems it might work, but i thinkrr under rrmight be still problematic
CodeTracer Shell
These are generally not functional right now, since they affect CodeTracer Shell, which is currently not stable/in very prototypical state:
CODETRACER_SHELL_BASH_LOG_FILE- overrides the log fileCODETRACER_SHELL_ID- overrides the shell IDCODETRACER_SESSION_ID- overrides the CodeTracer Shell session ID so that the current commands affect a previous shell sessionCODETRACER_SHELL_REPORT_FILE- overrides the report file of CodeTracer ShellCODETRACER_SHELL_USE_SCRIPT- ?CODETRACER_SHELL_RECORDS_OUTPUT- ?CODETRACER_SHELL_CLEANUP_OUTPUT_FOLDER- ?