Hacker News new | past | comments | ask | show | jobs | submit login
CoffeeConsole: A Chrome Extension (snook.ca)
98 points by dwynings on April 7, 2012 | hide | past | favorite | 14 comments



I just forked it and added a few things:

    * zero dependencies (except coffee-script.js of course)
    * REPL-style like the standard console
    * command history (up/down keys)
    * console capturing (pretty ugly as it is, the console API is not exposed)
    * on-the-fly syntax checking
    * fixed the icon :)
http://github.com/ricardobeat/CoffeeConsole

I messed too much with it to make a pull request. Sorry.


Of note, there's an experimental console API that you can use but it requires users to set a flag to use the extension and you wouldn't be able to add it to the chrome store (which I might do at some point).


I ventured into that, but having to set a flag is a deal breaker. Let's hope it becomes official soon.


btw: I just had a chance to look at your implementation. It's definitely going in a different direction than I wanted to take it. I understand the desire to match the default console but I'd like to keep the more powerful editor (along with some other features I'm looking to add).

Great work, though.


Didn't you find stupid that `chrome.devtools.inspectedWindow.eval` doesn't return the error object?


Looks good, but I prefer Firefox for most of my debugging. I hope someone eventually makes a similar extension for Firefox, integrating with Firebug (see http://getfirebug.com/wiki/index.php/Firebug_Extensions). There is xqjs (https://addons.mozilla.org/en-US/firefox/addon/xqjs/), but it doesn't look nearly as polished as this.


for firefox there is acebug (https://addons.mozilla.org/en-US/firefox/addon/acebug/) which is more polished (cells, autocompletion, better integration with firebug). it doesn't show converted js as you type but that's not very useful anyway


This extension made me realize that Chrome doesn't do syntax highlighting in the console. What a convenient feature!


As someone who is doing more and more coffeescript this is awesome. However debugging in the console seemed like the only way I was going to stay fresh in native javascript!


Very interesting; I like it.

Could you add a keyboard shortcut for running the CoffeeScript? Perhaps "option+(enter|return)" inserts a carriage return while (enter|return) runs the code?

Second choice: command+B "builds" the code.


I have it set that Cmd+Enter or Shift+Enter runs the code and Enter just creates a normal carriage return. I know this is a little backwards compared to the normal console, so it's definitely possible to switch it around. This just feels natural to me. (Down the road, having app preferences where this can be toggled might be good.)


Ahh yes, just came back here to edit my comment after I found that in the source. I can get used to that.

I'd love to see this become a drop-in replacement for the console. CoffeeScript is so much nicer to deal with in development it's practically the only time I'm still writing plain js.


Typically, when working with multiline inputs where return submits the input, option+return inserts a newline.


Nice work! I've wanted this for a long time. Giving it a try right now.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: