Search code examples
scalamavendebuggingintellij-ideagatling

Debug Gatling Scala Code in Intellij with Maven Java Project


I didn't add a comment in this Debug Scala Post because in my opinion it was another setup.

I had a similiar problem with Maven instead of SBT. I used Maven because the complete Java project was built upon it and I only wanted to debug my Gatling Scala code. However I'm not able to debug the code with the IDE.

Here's what I tried:

  • Clean the built mvn clean install
  • Invalidate caches in IDEA with the menu button
  • Use println to see whether the code is reached - worked
  • Redeploy the project on the Glassfish
  • Delete the generated files in the Glassfish and redeploy

This is my current setup:

My solution is as follows.


Solution

  • With the help of colleague I figured out that the main class in Engine from the Gatling tutorial can be used to debug out of Intellij.

    I basically built the whole archetype and moved the following files into the corresponding folders:

    • src/test/resources/gatling.conf
    • src/test/scala/Engine.scala and IDEPathHelper

    That did the trick for me.