Why Is My GoLand Race Detection Configuration Not Working as Expected?

Using GoLand 2024.2 and Go 1.22 on Windows 11, I attempted to set the environment variable GORACE=halt_on_error=1 to trigger a program output as soon as the first race condition is detected.

Configuration details:

  1. Environment Variables:

    • Name: GORACE
    • Value: halt_on_error=1
  2. Go tool arguments: -race

After applying these settings, the program did not produce the expected results. Assistance in resolving this issue would be appreciated.

Hi @WilliamColton,

Does the setting work outside Goland?
Maybe Goland does not pick up the environment variable for some reason.

Or maybe you need to wrap the value in double quotes (GORACE="halt_on_error=1", to avoid that Windows or Goland get confused by the second equal sign.