views:

37

answers:

2

Is it possible to debug a shell script in IntelliJ IDEA 9.0.3. I hava a shell script that calls a java program. I would like to set a breakpoint in this java program and debug through it. I hava a Bash plugin for IntelliJ and have set the breakpoint in the program but it doesn't stop at the breakpoint. Thanks, Tom

A: 

Just run the Java program in IntelliJ. What do you need the bash script for? Let IntelliJ run your Java program and let it provide the environment and inputs that bash is giving it.

If you do that your breakpoints will work just fine.

duffymo
+1  A: 

You can use Remote Debug to debug the Java program which you run from the shell script. IDEA will suggest you the list of JVM options, add them inside the shell script where you call Java VM. If suspend is enabled, the app will wait for IDEA debugger connection so that you can connect and start the debug session and stop on the breakpoints.

It's not possible to debug the shell script itself in IDEA.

CrazyCoder
Thanks for the suggestion this worked well.