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

          常用鏈接

          留言簿(46)

          隨筆分類(476)

          隨筆檔案(495)

          最新隨筆

          搜索

          •  

          積分與排名

          • 積分 - 1397568
          • 排名 - 16

          最新評論

          閱讀排行榜

          評論排行榜

          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 閱讀(317) 評論(0)  編輯  收藏

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


          網站導航:
           
          主站蜘蛛池模板: 获嘉县| 黎川县| 东方市| 和林格尔县| 灌南县| 南开区| 繁昌县| 洪江市| 荆门市| 开阳县| 贵德县| 北京市| 溧阳市| 黔东| 禄丰县| 阳山县| 桦南县| 和顺县| 阿克| 白朗县| 商城县| 昌黎县| 富源县| 建瓯市| 拉孜县| 玉山县| 新源县| 内黄县| 洛隆县| 北宁市| 平武县| 景泰县| 舟山市| 资溪县| 四会市| 昭觉县| 额敏县| 蒙自县| 永靖县| 泾川县| 屏山县|