欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

SBT --jvm-debug 9999 MacBookPro 解决方案

程序员文章站 2024-02-21 21:01:28
...

需求:在Play、Sbt环境下,通过Idea 单步调试

问题如下:

huideMacBook-Pro:graph huiyu$ sbt -jvm-debug 9999
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384m; support was removed in 8.0
[info] Loading settings from idea.sbt,plugins.sbt ...
[info] Loading global plugins from /Users/huiyu/.sbt/1.0/plugins
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from /Users/huiyu/ideaProject/graph/project
[info] Loading settings from builld.sbt ...
[info] Loading settings from build.sbt ...
[info] Loading settings from build.sbt ...
[info] Set current project to graphPlatform (in build file:/Users/huiyu/ideaProject/graph/)
[warn] The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0
[error] Expected letter
[error] Expected symbol
[error] Expected '!'
[error] Expected '+'
[error] Expected '++'
[error] Expected '^'
[error] Expected '^^'
[error] Expected '+-'
[error] Expected 'debug'
[error] Expected 'info'
[error] Expected 'warn'
[error] Expected 'error'
[error] Expected ';'
[error] Expected end of input.
[error] Expected 'early('
[error] Expected '-'
[error] Expected 'show'
[error] Expected 'all'
[error] Expected '*'
[error] Expected '{'
[error] Expected project ID
[error] Expected configuration
[error] Expected key
[error] 9999
[error] ^
[error] Not a valid command: jvm-debug
[error] Not a valid project ID: jvm-debug
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: jvm-debug
[error] jvm-debug
[error]          ^

解决如下:

1、在Sbt下面缺少【preloaded】文件,下面是完整的

huideMacBook-Pro:.sbt huiyu$ pwd
/Users/huiyu/.sbt
huideMacBook-Pro:.sbt huiyu$ ls
0.13        1.0     boot        preloaded   repositories

2、如果是MacPorts安装,则卸载MacPort使用HomeBrew
https://www.jianshu.com/p/f9b2c74cb519

3、按照HomeBrew会遇见一下问题,解决方案如下
mac下安装和使用brew
http://blog.csdn.net/fxp850899969/article/details/53284193

homebrew 升级失败
http://www.fanyeong.com/2017/12/14/homebrew-update-fail/

4、重写安装Sbt

5、启动在Play、Sbt环境下,通过Idea 单步调试

1)sbt -jvm-debug 9999
2)play run起来
3)idea配置如下,启动debug
SBT --jvm-debug 9999 MacBookPro 解决方案

相关标签: Sbt Play