dart-lang / webdev

A CLI for Dart web development.
https://pub.dev/packages/webdev
212 stars 75 forks source link

DevTools failed to load SourceMap: Could not load content for http://127.0.0.1:8080/packages/build_web_compilers/src/dev_compiler_stack_trace/stack_trace_mapper.dart.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE #1500

Open liudonghua123 opened 4 years ago

liudonghua123 commented 4 years ago

Thank you for taking the time to file an issue!

This tracker is for issues related to:

I followed the instructions on https://dart.dev/tutorials/web/get-started, https://dart.dev/web/debugging. And when I opened the configured chrome devtools, refresh the page. Then the console log the following warnings.

DevTools failed to load SourceMap: Could not load content for http://127.0.0.1:8080/packages/build_web_compilers/src/dev_compiler_stack_trace/stack_trace_mapper.dart.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://127.0.0.1:8080/packages/build_web_compilers/src/dev_compiler/dart_sdk.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

I can set breakpoint in dart code in source panel. The debugger stopped at the breakpoint, However the types of variable can't shown.

微信图片_20200425124756

This is the console of webdev serve.

D:\code\dart\quickstart-web>webdev serve
[INFO] Reading cached asset graph completed, took 162ms
[INFO] Checking for updates since last build completed, took 580ms
[INFO] Serving `web` on http://127.0.0.1:8080
[INFO] Running build completed, took 205ms
[INFO] Caching finalized dependency graph completed, took 118ms
[INFO] Succeeded after 328ms with 0 outputs (0 actions)
[INFO] -------------------------------------------------------------------------------------

This is the chrome devtools setttings.

微信图片_20200425124951

mcheung610 commented 2 years ago

This worked for me Go to inspect -> settings gear -> Uncheck 'enable javascript source maps' and 'enable css source map'. Refresh.

worked for me as well...... thanks.

This worked for me as well Go to bed -> wake up -> forget about this problem

erikmstg commented 1 year ago

o the poi

solved bro, thanks

Omkareshwar14 commented 1 year ago

Worked for me as well Thanks

paul-n-chamberlain commented 1 year ago

This worked for me

Go to inspect -> settings gear -> Uncheck 'enable javascript source maps' and 'enable css source map'.

Refresh.

This just gets rid of the error, but doesn't solve the issue. If you uncheck the JS and CSS source maps then you are forced to debug within the potentially minified or transpiled (if using TS) JS, which is not what you want to be doing. I feel like this might be fine for some, but for others it would be nice to have a path forward to actually be able to utilize the source maps for their intended purpose: debugging.

mkhalifah95 commented 1 year ago

For me it was an issue with my 'sass-loader' webpack configs, basically I was setting sourceMapContents: false which caused that issue to happen, removing that option made the source map working again!