CoffeeScript Debugger not working
Hi,
I'm using the new coffeescript debugger in RubyMine 5 and I can get everything working up to the point where when I set a breakpoint it isn't caught when I go to the page with the coffeescript. I have a coffee file under app/assets/javascripts/ called clusters.js.coffee. The contents are:
{code}
jQuery ->
cluster_group = $('div#cluster-group') <---- SET BREAKBPOINT HERE
cluster_group.find('#auto_scaling_group_id').attr("readonly", true)
cluster_group.find('#auto_scaling_group_environment').attr("disabled", "disabled")
cluster_group.find('#environment').hide()
cluster_group.find('#auto_scaling_group_id_details').attr("disabled", "disabled")
cluster_group.find('#id-details').hide()
{code}
If I set a break point say on the second line and go to my clusters page that is using this the breakpoint is never caught. The only thing I'm guessing that may be wrong is the documentation here http://confluence.jetbrains.com/display/RUBYDEV/Debugging+CoffeeScript+Code where you have to provide a mapping to the assets directory which I did but that directory doesn't exist if you use it in a browser. Is there anything else I should try?
Thanks,
Jay
请先登录再写评论。
Interestingly it works one of my machines but not the other. Same application and same version of RubyMine. I also compared the two run configurations and they look the same as well. Anything else I should check?
I have the same problem. The Coffescript debuger just doesn't work. I set up everything as you said: http://confluence.jetbrains.com/display/RUBYDEV/Debugging+CoffeeScript+Code. The plugin starts up in Chrome (I can see yellow bar on the top) but the code execusion doesn't stop in the break point.
However, when I'm starting my server I get this warnings:
/Users/ograbek/.rvm/gems/ruby-1.9.3-p286@check_action/gems/ruby-debug-ide-0.4.17.beta16/bin/rdebug-ide --port 54039 --dispatcher-port 54040 -- /Users/ograbek/Projects/check-action/script/rails server -b 0.0.0.0 -p 3000 -e development
Fast Debugger (ruby-debug-ide 0.4.17.beta16, ruby-debug-base19x 0.11.30.pre11) listens on 127.0.0.1:54039
/Users/ograbek/.rvm/gems/ruby-1.9.3-p286@check_action/bundler/gems/coffee-script-redux-debugger-45ab4936bc35/lib/coffee-script-redux-debugger/coffee_script_redux.rb:7: warning: already initialized constant EngineError
/Users/ograbek/.rvm/gems/ruby-1.9.3-p286@check_action/bundler/gems/coffee-script-redux-debugger-45ab4936bc35/lib/coffee-script-redux-debugger/coffee_script_redux.rb:8: warning: already initialized constant CompilationError
Jason,
At the moment our JavaScript debugger could not debug code executed during loading of the page.
In your example:
when brouser executes this code our Chrome extension hasn't got info about source maps. It starts working well after page loaded.
Olga, could you specify where do you put breakpoint (provide an example of code with breakpoint)?
This dubugger seems to have taken my system down.
- First coffee compiling stopped working (so editing any coffee file caused an error --- break point or whatever).
- Then I got these warnings on server startup:
/Users/kimardenmiller/.rvm/gems/ruby-1.9.3-p286@spokenvote/bundler/gems/coffee-script-redux-debugger-45ab4936bc35/lib/coffee-script-redux-debugger/coffee_script_redux.rb:7: warning: already initialized constant EngineError
/Users/kimardenmiller/.rvm/gems/ruby-1.9.3-p286@spokenvote/bundler/gems/coffee-script-redux-debugger-45ab4936bc35/lib/coffee-script-redux-debugger/coffee_script_redux.rb:8: warning: already initialized constant CompilationError
- Then I tried to rem out the gem 'coffee-script-redux-debugger', :git => "git://github.com/JetBrains/coffee-script-redux-debugger.git"
Now rails will not load any more pages.
Ouch! Help!
/kiim
Kim, could you provide you Gemfile.lock? It would help me to understand the cause of the problem.
Thank you.
Here you go; Thanks Audrey :)
/k
Attachment(s):
Gemfile.lock.zip
Using RubyMine 5.4.3.2.1, coffeescript debugging just doesn't work. I believe I have everything setup properly. The coffeescript files compile properly on file save (very nice). And the debugger is configured properly --- I can even get a breakpoint to stop in the entry point file. But when I add break points in any other file, they are ignored.
Also, stepping into the files from the entry point ... does not work (just gets lost). Stepping through the same file does not work --- the pointer gets lost (the variables' contents do not match the state of the program at the pointer). I would really appreciate some symbolic, line-by-line debugging for my coffeescript, and since you are about to rev RubyMine, it would be really nice if this feature could start to work.
I love Rubymine, the great features you have added, the rapid pace of development, but please give RubyMine coffeescript some serious TLC (tender loving care) for the upcoming release. Thank you.
Joseph, are you trying to debug Rails application or Node.JS application?
Thank you for replying.
I am just doing Node.js applications. (No rails.)
Andrey:
I just noticed another issue with CoffeeScript. Using the cmd-click navigation feature (e.g., cmd-click a class name require'd from a coffeescript file), the editor takes me to the JavaScript file. It would be nice if the cmd-click feature worked seamlessly with CoffeeScript as well (though the debugging is much higher priority). Perhaps this editor idiosyncrasy is easy to fix.
Thanks.
Could you please attach test project? In any case this can be related http://youtrack.jetbrains.com/issue/WEB-8174 (V8 bug http://code.google.com/p/v8/issues/detail?id=2825).
Yes, I experience the same issue. I ran the attached print.coffee project in RubyMine, and the breakpoint on line #4 (and then I tried line #5 (console.log) too) do not hit. And that symptom looks very much the same as my issue.
Since the bug seems to be a V8 bug, does that mean that coffeescript debugging _used_to_work_ but just does not work now?
Also, once the V8 bug is fixed, am I looking for a RubyMine upgrade, or do I get "the fix" via node upgrade (i.e., fresh V8 via npm fresh node)?
Thank you for helping resolve this issue. I am new to debugging in RubyMine, so I am very much looking forward to using that feature. :-)