Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run Dart code from Visual Studio?

I'm building an asp.net website using Visual Studio 2012. I'm considering adding some dart code into it.

I'm trying to check how this thing works: I downloaded the DartVS visual studio extension, and I took a ready dart code from the web. The dart code runs fine on dartium when I run it from the dart IDE.

I copied and pasted the code to Visual Studio (that now recognizes dart thanks to the extension). When I run it from there - I could see that the GUI appears, but the buttons don't seem to work. I put a breakpoint in the dart code's main function but it doesn't seem to get there.

What am I doing wrong?

Thanks!

like image 745
Cheshie Avatar asked Jul 10 '14 15:07

Cheshie


1 Answers

Edit: Although not full Visual Studio, I have created a VS Code extension that does support debugging here.

I'm the author of the extension you linked. Currently, there is no debug support. If you're going to launch from VS in the browser, you'll need to add Dartium to the list of browsers in Visual Studio.

The current version of the extension is very limited and just uses regular expressions to syntax highlight and runs the command-line Analyzer for error info. Both of these kinda work; but have some flaws.

I'm working on a new version; which is backed by a service written by Google, which has very reliable syntax highlighting, tooltips, GotoDefinition, code-completion and more. It's not ready for testing quite yet; but it'll be pushed as an update to the extension you already have once it's done.

The plan is to ultimately include Visual-Studio debugging; but for now, I'd recommend using Dartium and debugging in the developer tools.

like image 74
Danny Tuppeny Avatar answered Oct 03 '22 02:10

Danny Tuppeny