Skip to content

source maps aren't requests when running via pub serve #839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DartBot opened this issue Jun 5, 2015 · 5 comments
Closed

source maps aren't requests when running via pub serve #839

DartBot opened this issue Jun 5, 2015 · 5 comments
Labels
closed-duplicate Closed in favor of an existing report type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="96" height="96"hspace="10"> Issue by sethladd
Originally opened as dart-lang/sdk#16472


I don't see a source map file being sent, when serving my app over pub serve.

See screenshot.

I was hoping to debug via source maps when using pub serve ?


Attachment:
[Screen Shot 2014-01-31 at 4.23.31 PM.png](https://storage.googleapis.com/google-code-attachments/dart/issue-16472/comment-0/Screen Shot 2014-01-31 at 4.23.31 PM.png) (53.69 KB)

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="48" height="48"hspace="10"> Comment by sethladd


FWIW here's what it looks like when I just "run as javascript"


Attachment:
[Screen Shot 2014-01-31 at 4.25.56 PM.png](https://storage.googleapis.com/google-code-attachments/dart/issue-16472/comment-1/Screen Shot 2014-01-31 at 4.25.56 PM.png) (82.82 KB)

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="48" height="48"hspace="10"> Comment by sethladd


(notice the talk_to_me.dart.js.map request)

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


"pub serve" just starts an HTTP server. The browser is responsible for whether or not it requests a given file.

Can you manually request the source map file?

@DartBot DartBot added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) closed-duplicate Closed in favor of an existing report Pub-Serve labels Jun 5, 2015
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="48" height="48"hspace="10"> Comment by sethladd


Looks like pub serve isn't adding the trailing comments to the end of the app.dart.js file. The comments tell the dev tools about source maps.

Something like this:

//# sourceMappingURL=/path/to/file.js.map

To verify, run dart2js from the command line and check out its output.


Attachment:
[Screen Shot 2014-01-31 at 5.04.55 PM.png](https://storage.googleapis.com/google-code-attachments/dart/issue-16472/comment-4/Screen Shot 2014-01-31 at 5.04.55 PM.png) (83.84 KB)

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


Added Duplicate label.
Marked as being merged into #765.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

1 participant