Set breakpoints for shell script debugging in IntelliJ - intellij-idea

I am able to successfully run shell scripts and create and configure shell script run configurations in IntelliJ. However, I can't set breakpoints. When I try to put a breakpoint in the gutter or elsewhere as with regular Java debugging, no breakpoint appears. Has anyone had success with this, and if so how?
I'm using IntelliJ 2018.3.6 Community Edition.

Shell script debugging is supported only by the paid BashSupport Pro plug-in. You would also need the latest IntelliJ IDEA version to use it.
BashSupport Pro adds advanced features for shell scripts to your
JetBrains IDE. You can debug Bash scripts, run bats-core tests and
work efficiently with shell scripts.

Related

excute intellij cucumber scenario from outside intellij

I have running intellij with cucumber scenarios.
Now I want to start a specific scenario from outside intellij.
Is there a possibility e.g. from a shell or a java programm to excecute something in intellij?
Is there a possibility to use a currently running intellij instance for that?
Thanks
Jochen
you did not provide many info, but I bet if you use Maven you can run from a terminal / git bash etc your tests outside IDE, e.g.:
mvn test
See more info here: Run Cucucmber from terminal

IntelliJ: Launch Run-configuration from the embeded terminal

Lets say I have run-config1 and run-config2 setup for my project in IntelliJ.
I know there are ways of adding custom shell code to be perfomed before/after a build run, but that's not what I want to do.
Is there a way of calling them from the embedded terminal?
As of IntelliJ IDEA 14 there is no such way. You can write a plugin for IntelliJ IDEA that will handle a command like "idea.sh run configuration-name" and start the run configuration in the existing instance, but this is fairly non-trivial.

Skip tests in IntelliJ using Gradle

Does anyone know how I can skip JUnit tests in IntelliJ when doing a Gradle build like the following command line version? I have searched extensively for a solution but can't find one. I am in the process of converting an existing project to Gradle and need to support many developers that are not familiar with Gradle, some UX, some front end, and some Java. There are many broken Junit tests in the myriad modules and long-term we will fix them. Short term I need all other developers to use the tools they are familiar with to be able to do their job easily.
./gradlew build -x test
The Gradle-Android Compiler settings allow for command-line options but not non-android projects as shown in the IntelliJ settings dialog shown below.
You should be able to run a standard clean build from intellij if it's a gradle project (aka gradle integration in intellij). Then edit the configuration and add at the script parameters : -x test which will run the clean build (or any other task) without running tests.
I am using Intellij IDEA 2019.3 (Community Edition).
You can skip test using following settings.
You can get to this via Gradle panel located at right top corner.
Select task -> Run Configuration -> Right click -> Edit Run Configuration..
From intellij 2021.2 onwards, type the argument directly in Run text

Custom command for Run/Debug configurations in IntelliJ?

Is it possible to run a custom (shell) command from the Run/Debug configuration system in IntelliJ? I'm working with a framework that is not yet supported at all by IntelliJ (PhoneGap) and I want to add a few commands there.
This should work for you:
Edit Configurations > Before Launch > Add > Run External Tool
You can you Batch script plugin if you have windows or BashSupport for linux (and probably mac) os.
By putting bat or sh file inside your project you can execute them by adding new run configuration.

mono command line unit testing

I wrote a few nunit tests that I've run successfully in nunit on win7, and via MonoDevelop on my mac.
What I'd like to do now is run these tests non-stop (or until I kill it). I can't see any way to tell MonoDevelop to keep running over and over, so I'm trying to do this via the commandline.
Is there a way to run the MonoDevelop testing tool from the command line? I don't need reporting (my tests already report internally), just re-triggering every few minutes.
If there was a commandline tool, I could just wrap it in fabric or a shell script and just run it over and over...
Why don't you just use the normal nunit command line? It is contained with the standard Mono installation, available as nunit-console command.