Search code examples
grailsintellij-idea

Debug Grails Plugin with Intellij


I have a main app in one project, and I want to debug the plugin that it references. Intellij will only allow one project open at a time.

Is there a way to debug the plugin by first launching the main app?

It is grails 2.2.0, and Intellij 12 Ultimate. Thanks.


Solution

  • You can import the plugin as an additional module in IntelliJ into your app and set the grails plugin location to look at the absolute location of the plugin.

    This can be done by using this setting in BuildConfig.groovy

    grails.plugin.location.your-plugin = "/path/to/your/plugin"

    @Refer Plugins for details.

    Add breakpoints in the imported module (grails plugin) and run your app in debug mode to hit the break point.