flutter / flutter/devtools

Stack traces are obfuscated

Aperta
#8,627 4 commenti 2 reazioni 0 assegnatari Vedi su GitHub
dart2wasm P1 product-quality
Lingua principale
Dart
Stelle
1.7k
Fork
404
Merge medio
6g 17h
PR unite (30g)
18

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.