Debug IDEA plugin dependency

Hi,

I'm developing a plugin which needs the junit runner built-in plugin as dependency. So I included the idea-junit.jar, junit-rt.jar and resources_en.jar files into my plugin project and then placed a breakpoint at the method

prepareStreamsAndStart(..) from com.intellij.rt.execution.junit.JUnitStarter

Then I started a debugging session and in the newly started sandboxed IDE, I ran a test and stopped to see the stacktrace. Indeed, the aforementioned method was called, but it didn't stop at the breakpoint(in the other IDE where the plugin project was opened). 

This screenshot was taken from the sandboxed IDE. Also, note that I tried to place a breakpoint at other methods present in this stacktrace but without luck.

 

The interesting thing is that the package com.intellij.rt.execution.junit is present in two jars: junit-rt.jar(this is what I included in the plugin project) and idea-rt.jar(this comes bundled with the Community Edition but does not contain the JUnitStarter class in it)

 

UPDATE: I've found this question on SO: https://stackoverflow.com/questions/47486499/how-do-i-step-into-the-source-code-of-the-junit-plugin-in-intellij

The accepted answer does work but in this way I can only debug the .jar in the sandboxed IDE and this is not what I was looking for.

 

Please sign in to leave a comment.