posts - 495,comments - 227,trackbacks - 0
          http://stackoverflow.com/questions/4150776/debugging-scala-code-with-simple-build-tool-sbt-and-intellij

          idea下調試scala Web的設置
          1、Make sure you have sbt.Revolver in your project/plugsin.sbt file e.g.

          addSbtPlugin("io.spray" % "sbt-revolver" % "0.7.2")

          2、Set javaoptions in you build.sbt(or build.scala) file:
          javaOptions := Seq("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005")

          In particular use the suspend=y option. This will hold the app until you connect a remote debugger from Intellij

          3、Set up a debugger configuration in Intellij via Run / Edit Configurations menu. Press the + button, select the "Remote" option. Make sure the entries match the javaoptions above, in particular the port address of 5005. Give the config a name like 'Spray'.

          4、From your SBT console use the re-start command. You should see the 5005 port address in the feedback output.

          5、In Intellij set your breakpoints.

          6、From Intellij, select the Run \ Debug 'Spray'. This should connect to the spray-can web server. You should be able to see a lot of threads in the debug window.

          7、Beware that some of the Get directives in Spray seem to get executed on start up but not repeatedly on calling the website.
          posted on 2015-08-31 10:55 SIMONE 閱讀(315) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 普格县| 兰西县| 莒南县| 肇州县| 左权县| 富宁县| 侯马市| 皮山县| 棋牌| 临江市| 屯昌县| 韶山市| 师宗县| 金阳县| 公安县| 诸城市| 无锡市| 高平市| 介休市| 江城| 兰州市| 金乡县| 萝北县| 紫阳县| 湘乡市| 佛坪县| 太康县| 桦川县| 剑川县| 阜平县| 宜黄县| 壤塘县| 淮南市| 新和县| 芮城县| 潍坊市| 宜阳县| 吴川市| 遂平县| 衢州市| 双鸭山市|