dart-lang / dart-lang/webdev

Fail to load sourcemap/Failed to load asset at path: main.ddc.js.map

Open
#1,158 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
224
Forks
94
Avg merge
7h 14m
Merged PRs (30d)
2

Description

I am unable to use breakpoints with Dart Web.

I tried Android Studio, but that was entirely full of fail. To take one example, it says the flutter and dart plugins are not installed but they certainly are. I uninstalled and reinstalled but it just refuses to see them.

So now I'm trying VS Code.

Flutter Doctor says it's set up fine. I can launch the demo project but an attempt to set a breakpoint shows it as a "Unverified breakpoint" and it doesn't work. The Chrome (86.0.4240.80) console shows the "Devtools failed to load sourcemap" error that has been reported in other bug reports.

The VS Code debug console shows:
```[INFO] Debug service listening on ws://127.0.0.1:64101/1QwVMDwO59g=
Connecting to VM Service at ws://127.0.0.1:64101/1QwVMDwO59g=
[WARNING] Failed to load asset at path: main.ddc.js.map.

Status code: 404

Headers:
{
"date": "Sun, 18 Oct 2020 22:25:02 GMT",
"content-length": "9",
"x-frame-options": "SAMEORIGIN",
"content-type": "text/plain; charset=utf-8",
"x-xss-protection": "1; mode=block",
"x-content-type-options": "nosniff",
"server": "dart:io with Shelf",
"via": "1.1 shelf_proxy"
}
```

% dart --version
Dart SDK version: 2.10.2 (stable) (Tue Oct 13 15:50:27 2020 +0200) on "macos_x64"

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in the demo project using VS Code and Chrome, starting with the unverified breakpoint and the 404 for main.ddc.js.map shown in the debug console. Compare the Dart SDK 2.10.2 setup reported by dart --version and Flutter Doctor. Done means the sourcemap loads and a breakpoint becomes verified in Dart Web debugging.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
devtools, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.