Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Dart needs a REPL #4409

DartBot opened this Issue · 9 comments

4 participants


This issue was originally filed by

Dart needs a REPL - It's a glaring omission from a modern dynamic language :)


Assigning to SDK for the moment, but there are many pieces in the VM on top of the getting the REPL binary built and included in the Editor.

Added Area-SDK, Triaged labels.


This comment was originally written by

A good place for this Read–Eval–Print Loop would be the Dartium developer tools console (and eventually the Chrome console). Switching the console language between Dart and JavaScript could be achieved with a console switch/setting.

A console REPL would be preferable to a standalone or IDE hosted REPL because it would maintain state like a Smalltalk workspace and allow interaction with the DOM.


This comment was originally written by

A console-based REPL in Dartium/Chrome would indeed be awesome, but this doesn't address the server-side use case.


The Dartium console would be very nice, and exists now. You can't define a top-level function, but you can define one that's assigned to a variable or passed as a closure e.g.

[1, 2, 3].forEach((x) => print(x));
var f = (x) => x + 2;
[Dart Function] {}
blah(x) => x + 3;
"'': error: line 2 pos 9: ')' expected
blah(x) => x + 3


This comment was originally written by

where this an improvement over ne REPL at all, it'd be much more
awesome to just being able to fire up the dartvm in repl mode. i got
somthing like "dart -i" in my mind...

Am Di, 4. Feb, 2014 um 9:41 , schrieb:


This comment was originally written by

#­5: This doesn't work for me using the developer tools console ('SyntaxError: Unexpected token >' on the first line in Dartium 32.0.1700.58 (247491))... what am I missing? Is the Dart console somewhere else, or is there a setting to change?

#­4, #­6: I'll create a separate issue for a Dartium console if there isn't one, and this issue can stay focussed on a standalone REPL.


This comment was originally written by

I've found that I have to toggle the selector at the bottom and near the
left-middle of the tools window that says something like javascript context
to one of the dart packages. Once you do that, you should be able to
execute Dart code. Depending on what you need to access within your own
codebase, you may need to be more selective in your package choice.

I've only been using Dart for about 3 weeks, but I have to say that using
the Dartium web tools vs the Editor has ramped up my productivity (and I
just found out about it in the last 5 days :-) ). I think it should be
promoted more.

Hope that helps,


This comment was originally written by

Thanks Jesse, that works! Very neat and useful...

There is no need for a new Dartium console issue and this issue can be returned to its standalone REPL focus. Apologies for the noise.


Issue #17133 has been merged into this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.