Custom command for Run/Debug configurations in IntelliJ? - intellij-idea

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.

Related

Set breakpoints for shell script debugging in IntelliJ

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.

I don't have sbt console in intellij

I have created my first Sbt project and I would like to open Sbt console. Perhaps I make a confusion on what is Sbt plugin. I have scala plugin so I suppose Sbt is embeded inside it since I have Sbt windows.
When I look inside View -> Tool Windows I don't see Sbt console but I see Sbt
Even In Sbt panel, I don't see it
In this blog
https://blog.jetbrains.com/scala/2017/03/23/scala-plugin-for-intellij-idea-2017-1-cleaner-ui-sbt-shell-repl-worksheet-akka-support-and-more/
I find at section 2:
It’s now possible to build projects using SBT (instead of IntelliJ IDEA’s internal build system). As this option is still experimental, it should be manually enabled via Build / Execution / Deployment / Build Tools / SBT / Use SBT shell for build and import:
but I don't see Use SBT shell for build and import checkbox.
Do you have any idea?
You are running IntelliJ 2016.2. The integrated sbt shell and build by shell option is only available from 2017.1. I suggest you upgrade IntelliJ and the IntelliJ Scala plugin directly to 2017.3, where the options you are looking for are available.
You cannot access the sbt console from IntelliJ. For that you must run sbt in a terminal (even within IntelliJ), and once you’re inside the sbt shell type ‘console’ or ‘consoleQuick’ (runs the console without compiling the project you run it at).

How do i use idealGraphVisualizer?

I build the idealgraphVisualizer in openjdk9 using "ant build" command. Also I generated a file.xml by running my java file. After this, how can i see file.xml using the visualizer. I am running all these in a Linux system
Thanks
IdealGraphVisualizer is made on top of NetBeans platform. The easiest way to run it is to open the project in NetBeans and to build and run it from IDE.
After the IGV main windows appears, choose File -> Open... from the menu.

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.

How to execute External Tool in IntelliJ

Where can I actually launch an external tool in IntelliJ?
I know where to set up the external tool, and I've that done, but I cannot see where to launch it anywhere!
I don't see it from the Run menu, nor from any right-click menu.
You can run anything from the command line using the Command Line Tool Support plugin from JetBrains. See details here.
On menu Tools ⮕ External Tools:
In IntelliJ IDEA, in your run/test configurations (Run -> Edit Configurations) you have the choice of running an external tool 'before launch'. You can do this by opening up the run configuration menu, creating a new run configuration, and, down the bottom, adding a 'Run External Tool' option.
You can then add an external tool to be ran upon launch. You can run other programs or execute command line commands.
When you want to run the external tool, simply click the run button up the top of IntelliJ's main screen. If you want the external tool to run without the project compiling, simply remove the 'Make Project' and run project in the run configuration.