IntelliJ IDEA: Running a shell script as a Run/Debug Configuration

前端 未结 4 1420
轻奢々
轻奢々 2020-12-02 10:24

Is there a way by which a shell script can be invoked from IntelliJ Run/Debug configurations?

相关标签:
4条回答
  • 2020-12-02 10:48

    IntelliJ IDEA 2019.2 update

    New version of IntelliJ IDEA has Shell Script Support included. It means you can now create Shell Script build for your project.

    Edit Configurations > (+) Add New Configuration > Shell Script

    You can also build your project before executing your script by adding Run Another Configuration task. That's how it looks like: Add Shell Build window

    0 讨论(0)
  • 2020-12-02 10:54

    Not sure about 11, but in 12 there's a part of Run/Debug Configuration that is called "Before Launch" and you can select your shell script in "Add External tool" option.

    0 讨论(0)
  • 2020-12-02 10:59

    I just found out that we can invoke a shell script with the help of BashSupport plugin.

    0 讨论(0)
  • 2020-12-02 11:10

    'Add External tool' in the 'Before Launch' does the trick.

    Screenshot

    edit tool add shell script

    0 讨论(0)
提交回复
热议问题