1
votes

I tried to debug some dart code (as described here), but the problem is that when I set breakpoints (using dart to Javascript conversion) in the dart code and the breakpoint is hit I can only debug the generated Javascript file, which I hope is not how it is intended to be.

I also tried to replace the default browser and the Chrome browser with the Dartium version, but it does not open the dartium version when debugging. Although when I click the Chrome icon in Intellij it opens the correct dartium browser - but this seems to only show the content of the page without any debugging enabled.

I don't need both ways to work - I would prefer to debug the Javascript version - but I am also ok if I can get the Dartium version to stop at my breakpoints.

2

2 Answers

2
votes

Debugging JavaScript makes sense when there is a problem with the transpiled JS you want to localize.

Normally you should work with Dart and debug Dart and that only works with Dartium.
You can't expect a decent development experience using transpiled JS by default for development because transpiling is just to slow.

What you can do is using the debugger of the Dartium or Chrome development tools. Dartium development tools debugger works with Dart code too.
The experience here is often better than with the debugger of the Dart editor.

I don't use IntelliJ so I can't help configuring.

0
votes

Check out the DDC (Dart Dev Compiler)! It aims to provide Datium-like experience in regular Chrome. video introduction, project page