Technology1 min read

Debug Your Dart in a Java Debugger, and JFX Central on a Phone

By · Published by Everything Blog

In short

The debugging mechanism rewrites class file debug metadata during the build process so standard Java debuggers and stack traces point straight to original Dart sources. Testing the toolchain against Flutter applications led to runtime additions like isolate event loops, closures, and direct Gradle project imports. Meanwhile, the JavaScript target achieved notable speedups, and the iOS deployment of JFX Central brought critical JavaFX layout fixes such as multi-line text wrapping and background image handling.

Key points

  • Developers can step through Dart code and read native stack traces within standard Java d…: Developers can step through Dart code and read native stack traces within standard Java debuggers without specialized plugins.
  • Codename One builds can now import Flutter projects directly through Gradle using three a…: Codename One builds can now import Flutter projects directly through Gradle using three acceptance test applications.
  • Porting JFX Central to an iPhone resolved essential JavaFX compatibility issues including…: Porting JFX Central to an iPhone resolved essential JavaFX compatibility issues including CSS sizing and multi-line label wrapping.

Sources checked by our analysis pipeline: 1

Two weeks ago we showed that Codename One can build a Flutter app from its Dart source and run it faster than Flutter’s own build on most of our benchmarks. The first question from people who tried it was a fair one: what happens when something breaks? You’d be staring at a stack trace full of generated Java. That’s fixed, and this post also rounds up the rest of the week’s work on code you already have.

Dart stack traces in a Java debugger

The Dart transpiler turns your .dart

files into Java, and javac compiles that. Normally the class files would point at the generated Java, which you never wrote and shouldn’t have to read.

Now they point at your Dart. While it translates, the emitter records which Dart line produced each Java line. After javac runs, the build rewrites the debug information in every class file: line numbers become Dart line numbers, the source file becomes your .dart

file, and a JSR-45 source map is added with Dart as the default stratum. The mapping table itself is stripped,…

Technology