【问题标题】:Counterclockwise doesn't use stepping debugger in eclipse?逆时针在eclipse中不使用步进调试器?
【发布时间】:2012-12-06 20:25:24
【问题描述】:

逆时针dococontains他如下声明:

use the out-of-the-box Eclipse debugger possibilities to launch your launch configurations (Debug instead of Run

What you can currently do is being able to place breakpoints in clojure code edited either via the standard text editor

这对我来说建议使用 Eclipse 单步调试器。所以我设置了以下 Clojure 代码:

   (ns ccwdebugtest)

   (def a 1)

X) (def b 2)

X) (def c 3)

X) (def d 4)

在每个标记为X) 的点上设置调试点 - 然后我选择通过“调试为 > Clojure 应用程序”运行代码。

我期望得到的是启动 eclipse 调试模式的提示 - 而是在底部启动了一个新的 REPL。

当我输入(println d) 时,我得到了4 的结果。

这告诉我,我的断点当时未能中断。

我的期望不成立吗?难道我做错了什么?

(我正在运行 Eclipse Juno,在 OS X 10.8.2 上使用 Java 1.7,CCW 版本为 0.10.2.STABLE001)

【问题讨论】:

  • 如果 a b c 和 d 是只返回一个数字和我在函数中的断点的函数,它是否有效?

标签: eclipse debugging clojure read-eval-print-loop counterclockwise


【解决方案1】:

并非每个 Clojure 行都被编译(由 Clojure 编译器,此处与 CCW / Eclipse 无关)带有用于调试的行信息。

尝试创建一个函数,并为包含表达式的行添加断点,例如(+ 2 3)。

【讨论】:

  • 感谢 Laurent - 我们非常感谢您在 CCW 上所做的所有工作。那成功了。您是否介意确认您(还)不能在 CCW 调试器变量窗口中看到 Clojure vars 的值?
  • @hawkeye - 晚了很多年,但是......我可以确认,从当前版本的 CCW (0.35.1.STABLE001) Clojure 变量 do出现在变量窗口中。问题是要调试 Clojure 应用程序,您不能使用 Run-Debug 或 F11 启动调试器。相反,您需要在 Package Explorer 中右键单击项目名称,单击 Debug As,然后单击 Clojure Application。祝你好运。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-09-09
  • 1970-01-01
  • 1970-01-01
  • 2011-01-13
  • 1970-01-01
相关资源
最近更新 更多