Announcement Announcement Module
Collapse
No announcement yet.
Running a debug configuration in STS on a Maven profile Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Running a debug configuration in STS on a Maven profile

    Hi,

    I have a build with a Maven profile and I can run in as a Run configuration from within STS, the Spring Source Tool Suite Eclipse version.

    I can also run it from the command line with the command:
    mvn clean install -Pmysql-test -Dtest=NavbarLanguageDaoTest

    But when I want to run it as a Debug configuration from within STS, it runs as a Run configuration, that is, it runs fine to the end but does not stop to any of the breakpoints.

    In the Debug perspective, I can see the breakpoints in the pane listing the breakpoints and all of them are ticked.

    Why is it that no breakpoint is being stopped at ?

    Kind Regards,

  • #2
    How are you launching in STS? What kind of launch configuration are you using?

    You would be best off using "Debug as Java Application" launch type.

    Comment


    • #3
      Hi Andrew,

      Thanks for the watch tour. It's a Maven Build type debug configuration. The Maven runtime is an external one, the one used on the command line.

      Comment


      • #4
        Hi Andrew,

        Thanks for the watch tour. It's a Maven Build type debug configuration. The Maven runtime is an external one, the one used on the command line.

        I provided it with the goals "clean instal" and the same profile used on the command line.

        Comment


        • #5
          Could it be that you are running your tests as an external process?

          I would recommend that you launch as a Java app instead of using a maven launch if at all possible. Launching through maven, as you can already see, includes all sort of strangeness that is really not relevant to debugging your tests.

          Comment


          • #6
            I wonder what Java class to specify when creating a Java Application debug configuration.

            Say, to run the suite of integration tests...

            Comment


            • #7
              I was a little mistaken. You should not choose Java Application. Rather, choose your src/test/java folder, right-click -> Run as -> JUnit test.

              Comment

              Working...
              X