echo "starting debugging..."
set SCRIPT_DIR=%~dp0
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -Drun.mode=development -Xms512M -Xmx712M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M -jar "%SCRIPT_DIR%sbt-launch.jar" %*
I use a different method when debugging with Intellij that works well for me. Instead of setting it up for remote debugging and connecting to SBT, set it up as a local Jetty server. In the deployment tab make sure that it references /path_to_your_project/webapp. Do a single SBT package and then launch the server in debug mode within Intellij and your breakpoints should work. If you use JRebel, you can add a rebel.xml to src/main/resources that looks similar to:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://www.zeroturnaround.com/alderaan/rebel-2_0.xsd">
<classpath>
<dir name="/path_to_your_project/target/scala-2.10/classes">
</dir>
</classpath>
<web>
<link target="/">
<dir name="path_to_your_project/doccenter/src/main/webapp">
</dir>
</link>
</web>
</application>
Then if you launch the server in JRebel Debug (icon looks like a bug with a little JR in the corner) changes to static assets are picked up as you make them and changes to classes are picked up as you compile them (shift-command-f9 for an incremental compile of the selected tab).