BashSupport-Pro / bashsupport-pro

Public issue tracking for BashSupport Pro. This is a plugin, which provides advanced support for Bash scripts for JetBrains IDEs.
https://www.bashsupport.com
47 stars 2 forks source link

Feature Request: run Bashsupport via SSH connection #93

Closed AcaDemIQ closed 1 year ago

AcaDemIQ commented 2 years ago

Hello, Can this plugin run and debug bash scripts via SSH connections?

jansorg commented 2 years ago

Hi @AcaDemIQ, this isn't possible yet. But it's a likely candidate for the next major version.

Are you looking for support with the IDE's Run Targets feature or something else?

dcomer commented 2 years ago

I too am highly interested in remote debugging with Bashsupport via ssh. I have multiple bash admin scripts that I need to update periodically and several of the servers (NAS) do not support nano if you can believe it. That's primarily because the manufacturer used busy box to build the systems and I can not just replace the OS. So, I end up using vi with is a pain in the ass. Having the ability to remote edit and debug using this addin would be a blessing.

jansorg commented 2 years ago

I'm currently working on an implementation for the IDE's run targets feature. This allows to execute and even debug scripts on SSH and Docker targets. AFAIK WSL is also available on Windows hosts, but that's untested so far.

With the current proof of concept it's already possible to upload a script to the remote (using ssh and/or rsync) and then run or debug it.

JetBrains supports several more ways of remote development, e.g. Gateway, Projector and CodeWithMe. Those won't be supported, for now.

Run target seems to be the best, light-weight way to handle remote execution and debugging. There are several problems, which are more or less hard to solve.

@AcaDemIQ It this what you were looking for? @dcomer Does this sounds like a suitable solution for your use-case? Do your servers support ssh and rsync? Which version of Bash do these systems have?

Here's a screenshot of the current status, note the new chooser of the target system to choose between local and remote execution: Screenshot_20211230_211006

dcomer commented 2 years ago

Joachim,

My apologies for the late reply. My application computer(s) have both rsync and ssh. The version of bas is:

@.***:~$ bash --version GNU bash, version 5.0.17(1)-release (aarch64-unknown-linux-gnu) Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

Therefore you solution sounds like it would work for my situation. Thank you for your work and product.

jansorg commented 2 years ago

The first beta of 3.0 is available on the EAP channel now. Refer to https://plugins.jetbrains.com/plugin/13841-bashsupport-pro/eap-bashsupport-pro-3-0 for instructions how to install it and which IDEs support the run target features for remote execution and debugging.

jansorg commented 2 years ago

3.0 rc1 is now available. To test the preview, IDEs 2021.1 to 2022.2 need an additional repository setting: https://plugins.jetbrains.com/plugin/13841-bashsupport-pro/eap-bashsupport-pro-3-0 The new version is available on the stable channel (i.e. no setup) for 2022.2 EAP IDEs.

Unfortunately JetBrains decided to turn off the remote features (called "run targets"), but IntelliJ Ultimate, GoLand and CLion have it enabled. AFAIK Community IDEs have it enabled for the Windows builds (for WSL).

The BashSupport Pro website will be updated for the final 3.0 release, but the remote execution and remote debugging should be fully working on all of macOS, Linux and Windows in the supported IDEs.

I'm glad for feedback!

jansorg commented 1 year ago

Version 3.0 with support for remote development was released today, please refer to https://www.bashsupport.com/manual/remote-development/ for details how to use it.

allantinashemuzeya commented 9 months ago

Is it possible to skip the file copying bit I dont it to upload files to the server I have another script doing that already

jansorg commented 9 months ago

@allantinashemuzeya For remote execution or remote debugging?

allantinashemuzeya commented 9 months ago

For remote execution, I found a workaround to direct it to push the contents of an empty folder however it would be nice to configure it to not push files to the server first before it runs