Run Target support via WSL

Run your application or tests in Windows Subsystem for Linux (WSL) with ease.

Run Targets are an IDE feature that allows you to run code in environments where GoLand is not installed.

If a target already exists, select it from the Run on field in a Run Configuration, then run that configuration.

If not targets exist, then click on Manage Targets, next to the Run on field.

Then, click + (macOS) / Plus (Windows/Linux) and select in which environment you want to run the application or test.

After the IDE introspects that environment, click on Next, confirm the environment settings, and click OK.

Then select the newly created target in the Run on field.

Configure any additional options, and, finally, run the configuration as with any other.

If you want to compile your sources in a remote environment, then select the Build on remote environment option from the Run Configuration settings.

You choose to compile on the local machine. This means you don't have to worry about the dependencies being available in that environment.


Related Resources

Dump Goroutines from a Running Application
Dump Goroutines from a Running Application
Inspect the goroutines and memory of your application as it runs.
Inline Watches in Debugger
Inline Watches in Debugger
Keep your eyes on the code at all times.
Stop a Remote Process After Debugging It
Stop a Remote Process After Debugging It
Clean-up processes after interacting with them in remote debugging scenarios.