flutter / flutter/devtools

Stack traces are obfuscated

Ouverte
#8,627 4 commentaires 2 réactions 0 personnes assignées Voir sur GitHub
dart2wasm P1 product-quality
Langage dominant
Dart
Étoiles
1.7k
Forks
404
Merge moyen
6 j 17 h
PR mergées (30 j)
18

Description

In https://github.com/Dart-Code/Dart-Code/pull/5367#issuecomment-2532490346 I noted the stack traces for some errors were not very useful because of minification/wasm. After discussing with @kenzieschmoll we believed this might be VS Code-specific so to try and compare I checked what I'm getting outside of DevTools.

I can't repro the same issue, however I can force the kind of error noted at https://github.com/Dart-Code/Dart-Code/issues/5158#issuecomment-2497856004 by just running:

```
dt serve --dtd-uri ws://localhost:1234/invalid
```

When using WASM, this is what I see:

![image](https://github.com/user-attachments/assets/408e70ca-c2fa-4ac8-8cfa-7f0a028164be)

It's not clear to me if this is expected or not. There are some `.dart` files and line numbers in the call stack, but there are also some `main.dart.wasm` with hex offsets and all of the function names are obfuscated.

If I do the same without WASM, the function names are all still obfuscated although the top of the stack has some extra filenames that weren't in the wasm version (for example `logger_helpers.dart:34`).

![image](https://github.com/user-attachments/assets/52a6c6d6-9da9-4c19-92fe-4700a66a6637)

I'm not certain that this is wrong, but the screenshots from @elliette at https://github.com/Dart-Code/Dart-Code/issues/5158#issuecomment-2504607675 seem like they have much better information than here.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.