Remote Development
BashSupport Pro 3.0 and later supports remote development for your shell scripts.
JetBrains’ IDEs provide several ways of remote or collaborative development.
Remote Development with JetBrains Gateway
Gateway is JetBrains’ solution for remote development with a thin client. Please refer to JetBrains’ Gateway product page to learn more about it.
Gateway launches an IDE on the remote machine, but displays it only on your local machine, where you work on your projects. Your data is stored on the remote machine.
You can either launch Gateway from within your JetBrains IDE or with the help of the standalone Gateway desktop application, which is available from the product page or via JetBrains Toolbox.
Setup
- Please follow JetBrains’ instructions to set up Gateway and to connect to your remote host.
- In your Gateway client, install BashSupport Pro on the host at File → Settings… → Plugins On Host → Marketplace
- Restart your host IDE by clicking the Restart IDE…, which is shown after installing the plugin.
Using BashSupport Pro with Gateway is the same as using it on your local machine. Executing and debugging shell scripts will be performed on the remote machine, of course.
Limitations
Please note, that Gateway is only available with the paid JetBrains IDEs. Please refer to JetBrains’ licensing page for the specific license requirements.
External Resources by JetBrains
Remote Development with Run Targets
Run targets are an alternative way of remote development. With run targets the IDE is still executed on your local machine, but you can choose where you would like to execute your run configurations. Your data is stored on your local machine. When you execute a run configuration on a remote target, then your data is also copied to that machine.
Supported Environments
Unfortunately, JetBrains decided to enable the run targets feature only in some of their IDEs. Please vote for IDEA-303970 on the JetBrains issue tracker to convince JetBrains to drop this limitation.
2023.3 and Later
With version 2023.3, JetBrains enabled run targets for a few more products. The following products support the run targets feature:
- CLion
- GoLand
- IntelliJ Ultimate
- PhpStorm
- PyCharm Professional
- RubyMine
- RustRover
Earlier Versions
With 2023.2 and earlier versions, support for run targets is only available with these products:
- CLion
- GoLand
- IntelliJ Ultimate
Usage
When the run targets feature is available, an additional row Run on: is displayed for the run configurations of BashSupport Pro.
Use the dropdown to choose the target environment where your run configuration should be executed. To set up a new environment, you can either use the matching item in the dropdown or the Manage targets: link next to the dropdown.
Limitations
- As explained above, only a few of JetBrains’ products have the run targets feature enabled.
- The settings to configure Windows path mapping is unavailable with remote targets. The mapping is always defined by the selected target environment.
External Resources by JetBrains
Collaborative Development with JetBrains’ Code With Me
Code With Me is a remote collaboration tool made by JetBrains.
Usage
BashSupport Pro is supported in Code With Me sessions, just like most other plugins of your IDE. Later versions of JetBrains IDEs will provide a better integration and feature set than the earlier versions of Code With Me.
Limitations
- Run configurations are not fully supported by Code With Me guests yet.
You can use Run and Debug, but you can’t create or edit them yet. Please refer to the YouTrack issue for details.
External Resources by JetBrains
Alternatives to Remote Development on Windows
The solutions outlined above are all available on Windows.
But on Windows there are alternatives, which perhaps suit your use case. The following solutions are useful if you would like to work on a Windows machine, but develop shell scripts in a Linux system.
Keep Your Project on the WSL File System
If you’re already set up a Linux distribution with WSL2, then you can create your project on the WSL file system instead of the Windows file system.
Make sure to store your project in the WSL file system \\wsl$
instead of C:\
, for example.
Please refer to the JetBrains help page about WSL support for details.
BashSupport Pro 3.0 (and later) supports projects located on the WSL file system.
If it’s used with such a project, then the WSL Bash interpreter will automatically refer to the WSL distribution, where the project is located.
For example, if your project is located at \\wsl$\Ubuntu\projects\my-shell-project
, then bash.exe
is executed in a way to refer to the WSL distribution Ubuntu
.
If executing or debugging scripts does not work as expected, please make sure that WSL Bash is the topmost interpreter in the shell interpreter settings.
Connect JetBrains Gateway to WSL2
JetBrains IDEs 2022.3 and later allow to execute the backend of Gateway in a WSL environment.
Choose File → Remote Development… and then Connect to WSL to launch the backend part of Gateway in your WSL environment of your choice. In this setup BashSupport Pro will work as if it was installed on a native Linux distribution.