Results 1 to 7 of 7

Thread: Running a debug configuration in STS on a Maven profile

Hybrid View

  1. #1
    Join Date
    Mar 2008
    Posts
    257

    Default 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,
    Stephane

  2. #2
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    750

    Default

    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.
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  3. #3
    Join Date
    Mar 2008
    Posts
    257

    Default

    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.
    Stephane

  4. #4
    Join Date
    Mar 2008
    Posts
    257

    Default

    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.
    Stephane

  5. #5
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    750

    Default

    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.
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  6. #6
    Join Date
    Mar 2008
    Posts
    257

    Default

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

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

  7. #7
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    750

    Default

    I was a little mistaken. You should not choose Java Application. Rather, choose your src/test/java folder, right-click -> Run as -> JUnit test.
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •