In JavaScript you can access global variables and functions from the DevTool console (e.g. to call a function manually).
I tried to do this in Dartium, but I always get a reference error.
I tried following variations:
testFunc () {
return "test";
}
var testFunc2 = () {
return "test";
}
void main() {
var testFunc3 () {
return "test";
}
}
but none can be called via DevTool console of Dartium.
You need to select a Dart context.
When you open devtools > Console tab there is <top frame>
selected by default.
You need to switch to a Dart context like dart:core
.
As far as I remember it doesn't matter which Dart context is selected, just one of the Dart contexts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With