I am working with an API written in Scala that uses SBT to build it into a JAR file. I deploy the JAR file to a virtual machine (VM) and I can execute it successfully - the API starts up and handles requests.
Now I am trying to use the IntelliJ (v 2016.3.4) remote-debug configuration to place breakpoints in the source Scala code. Here's what I have done:
1) Open my source code as a Scala SBT project in IntelliJ .
2) Opened VM port 5005
3) Executed JAR on VM:java -noverify "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005" -cp /home/vagrant/shared/build/geotrellis-chatta-demo-assembly-0.1-SNAPSHOT.jar geotrellis.chatta.Main
I get this output:Listening for transport dt_socket at address: 5005
4) Added a remote-debug configuration in IntelliJ and started it. The IntelliJ console shows me this:Connected to the target VM, address: 'localhost:5005', transport: 'socket'
However, none of my breakpoints work.
Am I missing something in the above steps? I'm very new to Scala, haven't worked with Java seriously in years, and am just starting with IntelliJ.
UPDATE: IntelliJ debugger is definitely working - if I pause it, the API stops responding to requests until it becomes un-paused. But no stops on breakpoints.