Introduction
When running the Subspace Network Farmer & Node, sometimes you may encounter an error message that includes a line similar to the following:
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
This error message means that Rust (the programming language that Subspace Network Farmer & Node is written in) has encountered a problem and has provided a diagnostic backtrace that can help diagnose the issue. However, by default, the backtrace is not displayed. To see the backtrace, you need to enable the RUST_BACKTRACE environment variable.
In this guide, we will show you how to enable the RUST_BACKTRACE environment variable on Linux, macOS, and Windows (PowerShell).
Enabling RUST_BACKTRACE on Linux
To enable the RUST_BACKTRACE environment variable on Linux, follow these steps:
-
Open a terminal window.
-
Type the following command:
export RUST_BACKTRACE=1
-
Press Enter.
-
After exporting the environment variable, run the Subspace Network Farmer & Node as usual, and any errors encountered will display the backtrace.
Enabling RUST_BACKTRACE on macOS
To enable the RUST_BACKTRACE environment variable on macOS, follow these steps:
-
Open a terminal window.
-
Type the following command:
export RUST_BACKTRACE=1
-
Press Enter.
-
After exporting the environment variable, run the Subspace Network Farmer & Node as usual, and any errors encountered will display the backtrace.
Enabling RUST_BACKTRACE on Windows (PowerShell)
To enable the RUST_BACKTRACE environment variable on Windows using PowerShell, follow these steps:
-
Open a PowerShell window.
-
Type the following command:
$Env:RUST_BACKTRACE=1
-
Press Enter.
-
After exporting the environment variable, run the Subspace Network Farmer & Node as usual, and any errors encountered will display the backtrace.
Conclusion
Enabling the RUST_BACKTRACE environment variable can be useful for diagnosing errors when running the Subspace Network Farmer & Node. By following the steps in this guide, you can enable the RUST_BACKTRACE environment variable on Linux, macOS, and PowerShell.