Announcement Announcement Module
No announcement yet.
Debug / browse plugins included using grails.plugin.location Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Debug / browse plugins included using grails.plugin.location

    I have included some plugins and their source in the buildconfig.grooy using grails.plugin.location . The main application does include these when resolving dependencies. However I cannot browse the source code of the plugins like I can browse springcache. These plugins do not have the project code so I executed the grails integrate-with --eclipse but they still don't load with browse ability. I would like to be able to set breakpoints within these plugins but I can't figure out how. HELP!


  • #2
    If you are doing the same thing as described here:

    Then all you'd need to do to make STS aware of your 'inplace' plugin dependencies is execute a 'refresh dependencies' from the 'Grails Tools' menu.

    Don't use the 'integrate-with-eclipse' grails command... its meant for people who aren't using STS but a more 'vanilla' eclipse. It also does not support the kind of multi-project setup you are interested in.

    Also a tip, you can use the 'grails plugin manager' also available under Grails Tools menu to install 'inplace' plugins from your workspace (this basically does the same thing as the manual process using 'grails.plugin.location'... and it will run refresh dependencies for you automatically, so everything gets setup correctly for STS to understand the dependencies between your projects).


    • #3
      Need more HELP!....

      Almost what I need. I see the plugins under plugins, but what I 'd like to do is set breakpoints in those plugins.


      as you can see from this window, you can open plugins like quartz and can set breakpoints. The one like mscore does not have a plus, can't be opened in SST and can't have breakpoints. This is what I would like to do.

      any suggestions?

      Attached Files


      • #4
        Is that plugin an 'inplace' plugin? Because it doesn't look like it has the correct icon of an inplace plugin (should look like a link).

        Anyhow, if it is an inplace plugin then I don't think you will get the source code linked directly under there. This is because the inplace plugin is represented differently: as a eclipse project dependency. The node you see is just a 'fake' to show you that you have a dependency there.

        You should also have this project in your workspace... so just navigate to it and put breakpoints in the code there. That should work... but let us know if it doesn't. Could be a bug we need to fix :-)



        • #5
          I don't know if it is an 'inplace' plugin. What is that?

          How do I add this plugin to my workspace? Should I build the plugins using STS, then add the project to the space? If so, how does the original code see that the plugin is really what is linked to in the browser?


          • #6
            An 'in place' plugin is a grails plugin that you have setup locally instead of getting from a repository like grails central.


            In STS you can create new plugin projects by doing 'New >> Grails Plugin Project'.
            It is equivalent to running "grails create-plugin" command and then importing the project into your workspace.

            To turn this into an 'in place' plugin dependency of another grails project (a plugin or an app) you can use the Grails Plugin Manager from the Grails tools menu. The plugin manager will show grails plugins it finds in your workspace at the top of the list and you can then install it as a plugin just as you would a plugin from grails central. The installer will essentially make changes to your BuildConfig.groovy in the same way as described in the blog link I posted above.

            So to turn your pure java project into an inplace plugin I suggest these steps:

            1) create a plugin project in your workspace using 'New Grails plugin project' wizard.
            2) copy the java code from you java project into the src/java directory in your new plugin.
            3) install the plugin into your app using the plugin manager.

            Let me know if it works or if you need more help.



            • #7
              I also have the problem that the debugger doesn't show the inplace plugin's source code.
              I am using 2.9.0.M2, the inplace plugin is a project in my workspace.
              The plugin is displayed in the plugin list as you described (with this little arrow symbol).
              I can add a breakpoint in a service which is located in the inplace plugin. The debugger stops at this
              breakpoint, but no source attached.


              • #8
                Hi Steynberg,

                It sounds like a problem with the launch not having a correctly setup source path computer. I'd say that this is a bug in the tooling. Since there are a few different ways of launching things (several options in "Debug As >>" menu), could you provide more details on how exactly you are trying to run your app (or tests). I'll then try to reproduce the problem.



                • #9
                  FYI: I recalled fixing a similar sounding issue not too long ago:

                  This issue was already fixed for M2. We may be seeing a similar problem, this time involving project dependencies instead of jar dependencies).


                  • #10
                    Hi Kris,

                    I start the app with the Bug-Button in the tool bar. The correspondent debug configuration starts the application with "grails run-app".
                    When I start the application with the project's context menu "Debug as > Grails (run-app)", STS starts one of the scripts in the project's script folder instead of the application.