REPL for dartlang

后端 未结 4 1758
独厮守ぢ
独厮守ぢ 2021-01-07 19:29

Is there a REPL for Dart to experiment with?

I tried inputing dart code in devtools in Dartium and that also didn\'t work.

So I couldn\'t find an easy way t

4条回答
  •  耶瑟儿~
    2021-01-07 19:56

    I tried inputing dart code in devtools in Dartium and that also didn't work.

    I'm very new to Dart, but something I came across was that you CAN evaluate code in Dartium. In order to do so, you must first load a page with Dart code in it and then toggle this selector in the console from "javascript page context" to one that references a Dart package or Dart code.

    enter image description here

    Once you do that you should be able to execute Dart in the console:

    enter image description here

    As a VIM user, I hardly have to open the Dart Editor now :). I should also mention that breakpoints, hovering over stepped into code to get variable details, navigating the call stack, and some level of intellisense in the console also work. I couldn't get conditional breakpoints to work, though.

提交回复
热议问题