-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: debuggingDebugging, breakpoints, expression evaluationDebugging, breakpoints, expression evaluationa: releaseChallenges faced when attempting to productionize an appChallenges faced when attempting to productionize an appfound in release: 3.22Found to occur in 3.22Found to occur in 3.22found in release: 3.24Found to occur in 3.24Found to occur in 3.24has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform teamTriaged by Web platform team
Description
If we take the flutter counter app (created via flutter create app) and modify it slightly via
dependencies:
+ helper:
+ path: ../helperand
+ import 'package:helper/helper.dart';
...
+ int i = 0;
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
void _incrementCounter() {
+ if (++i % 5 == 0) helper(() => throw 'baz');
setState(() {and have the helper method in package:helper call some things which eventually call the given closure to it
// package:helper/helper.dart (aka ../helper/lib/helper.dart)
helper(void Function() fun) {
print('helper');
helper1(fun);
}
helper1(void Function() fun) {
print('helper2');
helper2(fun);
}
helper2(void Function() fun) {
print('helper2');
fun();
}, then we can break on the exception in chrome.
What we'll observe is that
- The core library methods have no source maps (e.g.
js_helper.dart:throwExpression) - The
lib/main.darthas valid source maps - The
package:helper/helper.darthas invalid source maps (for me it shows a html file in chrome) - The
package:flutter/*code has valid source maps
So either
- we have to instruct dart2js to emit different source maps for packages (e.g.
package:helperin this case) or - we have to make the
flutter runtool's http server serve the files for the filepaths currently emitted by dart2js
(On dart2wasm this issue doesn't exist because we currently bake in absolute file url which work very well on developer machines, see dart-lang/sdk#56232 for follow up tasks)
/cc @yjbanov @sigmundch @a-siva for finding someone to own this
rorystephenson and felipebueno
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: debuggingDebugging, breakpoints, expression evaluationDebugging, breakpoints, expression evaluationa: releaseChallenges faced when attempting to productionize an appChallenges faced when attempting to productionize an appfound in release: 3.22Found to occur in 3.22Found to occur in 3.22found in release: 3.24Found to occur in 3.24Found to occur in 3.24has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform teamTriaged by Web platform team