How to run Dart code from Visual Studio?

I am building a website asp.netusing Visual Studio 2012. I am considering adding code to it dart.

I am trying to check how this works: I downloaded the visual extension DartVS , and I took the ready-made dart code from the Internet. The dart code works fine dartiumwhen I run it from dart IDE.

I copied and pasted the code in Visual Studio (which now recognizes the dart thanks to the extension). When I run it from there, I see a GUI appear, but the buttons do not seem to work. I set a breakpoint in the dart function main, but it doesn't seem to have got there.

What am I doing wrong?

Thank!

+4
source share
3 answers

Edit: Although not a complete Visual Studio, I created a VS Code extension that supports debugging here .

I am the author of the extension associated with you. There is currently no debugging support. If you intend to run VS in a browser, you need to add Dartium to the list of browsers in Visual Studio.

The current version of the extension is very limited and simply uses regular expressions to highlight syntax and launches a command line parser for error information. Both of these types of work; but have some disadvantages.

; Google, , , GotoDefinition, . ; , .

Visual-Studio; Dartium .

+5

VS - ? Dartium, , , , dart2js .

, , .

,

+1

You can start pub serveDartium manually and point Dartium to the URL pub serve. DartEditor also launches for this pub serve.

I don’t know if your extension supports any debugging support, but in Dartium you can debug Dart and JavaScript code, such as JavaScript code, in the usual Chrome browser tools.

+1
source

Source: https://habr.com/ru/post/1547936/


All Articles