Skip to content

dart2wasm --debug flag not working #55903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Rexios80 opened this issue Jun 2, 2024 · 2 comments
Closed

dart2wasm --debug flag not working #55903

Rexios80 opened this issue Jun 2, 2024 · 2 comments
Labels
area-dart2wasm Issues for the dart2wasm compiler.

Comments

@Rexios80
Copy link
Contributor

Rexios80 commented Jun 2, 2024

The following command runs code with assertions disabled, which means that it is not running in debug mode:

dart test -p chrome -c dart2wasm --debug

Unsure if this affects dart2wasm directly or the flag just isn't being passed

Related issues:
flutter/flutter#148850

@lrhn lrhn added the area-dart2wasm Issues for the dart2wasm compiler. label Jun 4, 2024
@mkustermann
Copy link
Member

The --debug flag does not seem to work for dart2wasm either. That is probably the root cause of this

The Dart2Wasm compiler is only used for --profile / --release builds (just like Dart2JS). For iterative development the DDC compiler (which also compiles to JS) is used (or the VM's JIT). In the short term dart2wasm will not have a development compiler (with hot-restart / hot-reload).

That being said, one can use Dart2Wasm for profile/release builds and still enable assertions - via dart compile wasm --enable-asserts test.dart.

dart test ... is using package:test under the hood which doesn't seem to have a way to enable assertions when running under wasm - see package:test_core/src/runner/wasm_compiler_pool.dart.

@Rexios80 Is your main request to run tests with assertions enabled? In that case consider filing an issue at https://github.com/dart-lang/test instead.

/cc @kevmoo

@Rexios80
Copy link
Contributor Author

Rexios80 commented Jun 4, 2024

Yes you are correct. I will file an issue there instead. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart2wasm Issues for the dart2wasm compiler.
Projects
None yet
Development

No branches or pull requests

3 participants