posts - 495,comments - 227,trackbacks - 0
          <2015年8月>
          2627282930311
          2345678
          9101112131415
          16171819202122
          23242526272829
          303112345

          常用鏈接

          留言簿(46)

          隨筆分類(476)

          隨筆檔案(495)

          最新隨筆

          搜索

          •  

          積分與排名

          • 積分 - 1396016
          • 排名 - 16

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          http://stackoverflow.com/questions/4150776/debugging-scala-code-with-simple-build-tool-sbt-and-intellij

          idea下調(diào)試scala Web的設(shè)置
          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 閱讀(317) 評(píng)論(0)  編輯  收藏

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 商南县| 吉林市| 大洼县| 镇康县| 沅陵县| 明溪县| 巫山县| 嘉荫县| 上饶县| 威海市| 湘西| 灵石县| 阿鲁科尔沁旗| 金阳县| 称多县| 隆安县| 漳平市| 朝阳市| 马关县| 冕宁县| 新郑市| 肇源县| 丹凤县| 会同县| 石景山区| 大埔区| 山东省| 平泉县| 古田县| 民乐县| 横峰县| 武威市| 农安县| 邵武市| 金堂县| 喜德县| 白银市| 清苑县| 化德县| 宁晋县| 凌海市|