如何在 sbt 或 Scala 的 REPL 中获得类似 jdb 的功能(设置断点或显示变量)?
How to get jdb-like features (setting breakpoints or displaying vars) in sbt or REPL for Scala?
有没有办法在 repl 或 sbt 会话中获得类似的功能而不是打开 jdb?
我正在寻找的功能:
- 定义断点的能力:
- :bp mySource.scala:79 // 在第 79 行停止 mySource.scala
- :bp org.mycompany.MyClass:14 // 在 myClass 的第 14 行停止(不知道是否有人支持这样的事情..)
- 打印出变量
- :p myList
- 评估表达式,包括 case 语句和闭包加分
你不能把一个好主意记下来——见帖子 A non-runaway-REPL?:
Maybe it could also use a "safe" mode where it forks a JVM. While
we're at it, it's time for a debug command.
我不知道该命令应该称为 :forked
、:borked
还是简单地称为 :wtf
。
有没有办法在 repl 或 sbt 会话中获得类似的功能而不是打开 jdb?
我正在寻找的功能:
- 定义断点的能力:
- :bp mySource.scala:79 // 在第 79 行停止 mySource.scala
- :bp org.mycompany.MyClass:14 // 在 myClass 的第 14 行停止(不知道是否有人支持这样的事情..)
- 打印出变量
- :p myList
- 评估表达式,包括 case 语句和闭包加分
你不能把一个好主意记下来——见帖子 A non-runaway-REPL?:
Maybe it could also use a "safe" mode where it forks a JVM. While we're at it, it's time for a debug command.
我不知道该命令应该称为 :forked
、:borked
还是简单地称为 :wtf
。