Does DART support predefined macros such as:
__LINE__
or
__FUNCTION__
The reason for asking is that the transformer DART2JS makes the console log not useful as all the logs shows: js_primitives.dart:30
[update BasE]
When using the transformer dart2js, print("hello world");
will result in:
JS('void', r'console.log(#)', "hello world);
to be invoked from function: printString(String string) residing in the library dart2js._js_primitives
This results that the console.log message always contains the same line number over and over again wherever in the DART code a print();
is used. (As console.log will add automatically the filename and line-number to the console display of the wrapper function residing in dart2js._js_primitives)
As the current implementation of adding file-name and line-number to the console.log message is useless, it would have been nice if there would be another method that allows to display additional information.
As example, print("hello world" __FUNCTION__ __LINE__);
would result in additional debug information that can be more useful.