Stack traces are obfuscated
- 主要语言
- Dart
- 星标
- 1.7k
- 派生
- 404
- 平均合并
- 6 天 17 小时
- 30 天内合并 PR
- 18
描述
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:

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`).

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.
贡献指南
调研方向
首先使用 `dt serve --dtd-uri ws://localhost:1234/invalid` 重现报告的错误,并比较 WASM 和非 WASM 的堆栈跟踪。阅读链接的 Dart-Code issues 和 pull request,了解预期输出;完成的标准是确定混淆后的名称和偏移量是否符合预期,并在不符合时找出相关差异。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- dart, wasm
- 领域
- devtools
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100