print('This will be logged to the console in the browser.');
A basic top-level print function is always available in all implementations of Dart (browser, VM, etc.). Because Dart has string interpolation, it's easy to use that to print useful stuff too:
var a = 123;
var b = Point(2, 3);
print('a is $a, b is ${b.x}, ${b.y}');
You can also use print(), but this is not a good practice because it can slow down your program in a production environment. debugPrint, log and other methods will prevent this.