如何:在 IDE 之外调试 Scala 代码
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2272705/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How To: debug Scala code when outside of an IDE
提问by BefittingTheorem
I'm experimenting with using jEdit as my main editor for writing Scala code.
我正在尝试使用 jEdit 作为我编写 Scala 代码的主要编辑器。
Along side jEdit I'm using Apache Buildr and DTerm. This all works well, except I'm really not sure how I would go about debugging Scala application outside of a large IDE?
除了 jEdit,我还使用 Apache Buildr 和 DTerm。这一切都很好,除了我真的不确定如何在大型 IDE 之外调试 Scala 应用程序?
Are there recommended practices/tools for debugging outside of an IDE?
是否有用于在 IDE 之外进行调试的推荐做法/工具?
采纳答案by VonC
I am not sure you can debug entirely through the CLI. Any Java-based debug tool should be enough.
我不确定您是否可以完全通过 CLI 进行调试。任何基于 Java 的调试工具都应该足够了。
This SO questionmentions jswat, which also has a console mode.
It is used in this blog entryand can be installed quite easily as illustrated here.
回答by retronym
回答by Senkwich
There was a stack overflow question from years ago about a CLI Scala debugger. I just posted a new answer to it back in February about a new CLI called sdbthat mimics jdbbehaviour while providing support for Scala name demangling and other improvements.
多年前有一个关于 CLI Scala 调试器的堆栈溢出问题。我刚刚在二月份发布了一个新的答案,关于一个名为sdb模仿jdb行为的新 CLI ,同时提供对 Scala 名称分解和其他改进的支持。
Is there a Scala command-line debugger?
The answer from that topic was
该主题的答案是
Old question, but here is sdb, which is a jdb clone written in Scala using the Ensime debugger api: https://github.com/ensime/scala-debugger/releases/tag/v1.1.0-M3
And the sbt plugin: https://github.com/ensime/scala-debugger/releases/tag/v1.1.0-M3-2
老问题,但这里是 sdb,它是使用 Ensime 调试器 api 用 Scala 编写的 jdb 克隆:https: //github.com/ensime/scala-debugger/releases/tag/v1.1.0-M3
和 sbt 插件:https: //github.com/ensime/scala-debugger/releases/tag/v1.1.0-M3-2

