gpt4 book ai didi

scala - 如何在 sbt 或 Scala 的 REPL 中获得类似 jdb 的功能(设置断点或显示变量)?

转载 作者:行者123 更新时间:2023-12-02 03:29:16 25 4
gpt4 key购买 nike

有没有办法在 repl 或 sbt session 中获得类似的功能,而不是打开 jdb?

我正在寻找的功能:

  • 定义断点的能力:
    • :bp mySource.scala:79//在第 79 行停止 mySource.scala
    • :bp org.mycompany.MyClass:14//在 myClass 的第 14 行停止(不知道是否有人支持这样的事情..)
  • 打印变量
    • :p 我的列表
  • 评估表达式,包括案例陈述和闭包加分

最佳答案

你不能把一个好主意记下来 -- 请参阅线程 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

关于scala - 如何在 sbt 或 Scala 的 REPL 中获得类似 jdb 的功能(设置断点或显示变量)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28127659/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com