如何调试ClojureScript [英] How to Debug ClojureScript
问题描述
我为这个看似蠢的问题道歉,但我已经玩了ClojureScript几个星期了,我不知道这个简单的问题:
I apologize for this seemingly stupid question, but I've been playing with ClojureScript on and off for a few weeks now, and I can't figure out this one simple question:
如何调试ClojureScript?
这是问题:
- 我写我的* .cjs文件
- 我运行cljsc / build ...
-
-
- 发生错误。
- 我打开firefox控制台。 js中的一行,我觉得这是不可理解的,我不知道原始cljs文件的哪一行。
<
- I write my *.cjs files
- I run cljsc/build ...
- I load up my webpage.
- Something bad happens.
- I open up the firefox console.
- I get a line in the generated js, which I find incomprehensible, and I have no idea which line of the original cljs file it came from.
我的问题:
开发ClojureScript应用程序的正确方式是什么?
What is the right way to develop ClojureScript applications?
PS我看过ClojureScriptOne - 我不喜欢的是,它一起串起来一堆技术;我更喜欢在将它们全部链接在一起之前了解如何使用每个个体。
PS I've looked at ClojureScriptOne -- what I don't like about it is that it strings together a bunch of technology all at once; and I'd prefer to understand how to use each individual piece on its own before chaining it all together.
+ mustache + compojure,[主要是因为我可以使用我的标准Clojure调试技术]但ClojureScript是另一个野兽。
I'm comfortable with ring + moustache + compojure, [mainly because I can use my standard Clojure debugging techniques] but ClojureScript is another beast.
UPDATE :相当有点,因为这个问题第一次提出。现在调试ClojureScript应用程序的正确方法是启用源地图 - http://github.com/clojure/clojurescript / wiki / Source-maps
UPDATE: Things have changed quite a bit since this question was first asked. The proper way to debug ClojureScript applications these days is to enable source maps - http://github.com/clojure/clojurescript/wiki/Source-maps
推荐答案
更新:
要调试ClojureScript使用源映射 - http://github.com/clojure/clojurescript/wiki/Source-maps
To debug ClojureScript use source maps - http://github.com/clojure/clojurescript/wiki/Source-maps
这篇关于如何调试ClojureScript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!