Custom run/debug from margin plugin



I have developed a custom kotlin DSL that declares integration tests for a particularly complex system, and I'd like to assist developers in writing tests by making it possible to run an individual test from the margin, just like when there is a `fun main() {...}` present in the file. Because of various structural reasons I can't just have a main function for every test so would like to have it where the DSL block is present (I can probably find this block easily enough with reflection).

Is there any useful reference guide on where to start with this? I'm using kotest so I'm intending to dissect which can play specs from the margins, so must have the bits I need, but if there is an easier way or better reference material, I'd much appreciate it!


Thanks, Zak


Such run line markers are usually contributed via com.intellij.runLineMarkerContributor extension point, you can find all usages from OSS Plugins in this list:





Thanks Yann, that's a really useful resource. I'll have a dig through a few and see if I can find something similar to what I'm trying to achieve


Please sign in to leave a comment.