如何调试ClojureScript [英] How to Debug ClojureScript

查看:130
本文介绍了如何调试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?

这是问题:


  1. 我写我的* .cjs文件

  2. 我运行cljsc / build ...

  3. <


  4. 发生错误。

  5. 我打开firefox控制台。 js中的一行,我觉得这是不可理解的,我不知道原始cljs文件的哪一行。

  1. I write my *.cjs files
  2. I run cljsc/build ...
  3. I load up my webpage.
  4. Something bad happens.
  5. I open up the firefox console.
  6. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆