Skip to content

Use with source map loader #4

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
nwolverson opened this issue Dec 10, 2016 · 16 comments
Closed

Use with source map loader #4

nwolverson opened this issue Dec 10, 2016 · 16 comments

Comments

@nwolverson
Copy link

A previous version of this repo had a setup with source maps, I know the purs-loader went through some changes since then. I tried to enable source maps and set the right devtool/use source-map-loader as before but that didn't seem to work.

Do you know if it's possible to do this still or is there some blocker?

@ethul
Copy link
Owner

ethul commented Dec 11, 2016

I admit I haven't tried this with the source-map-loader in a while, but I believe it should still work. One thing I can think of is to double check that pscArgs: { sourceMaps: true } is set as an option to the purs-loader. If you are able to provide your webpack config, I can dig into this a bit more.

@ethul
Copy link
Owner

ethul commented Jun 4, 2017

Closing. Please open on ethul/purs-loader if there is still an issue with this. Thanks!

@ethul ethul closed this as completed Jun 4, 2017
@nwolverson
Copy link
Author

For the record I can't say one way or the other if there's any issue, I moved onto other things before getting anywhere, I've certainly lost all state by this point...

@ethul
Copy link
Owner

ethul commented Jun 4, 2017

Thanks for the update.

@paulyoung
Copy link

I tried to get this working in this repo in a similar fashion to what was done in 14df7ec but haven't been able to get source maps working that way yet.

@paulyoung
Copy link

Correction: a015281

@paulyoung
Copy link

Some debug info:

DEBUG='purs-loader' npm run webpack:server

> [email protected] webpack:server /Users/py/projects/ethul/purescript-webpack-example
> webpack-dev-server --progress --inline --hot

 10% building modules 1/1 modules 0 active
Project is running at http://localhost:4008/
webpack output is served from /
Content not from webpack is served from .
 10% building modules 4/9 modules 5 active ...bpack-example/node_modules/url/url.js  purs-loader loading Example +0ms
  purs-loader compile psa [ '--output=output',
  purs-loader   '--source-maps',
  purs-loader   'bower_components/purescript-*/src/**/*.purs',
  purs-loader   'src/**/*.purs' ] +1ms
  purs-loader compiling PureScript... +3ms
  ...

@paulyoung
Copy link

FWIW, I see this:

screen shot 2017-08-01 at 4 59 54 pm

@ethul
Copy link
Owner

ethul commented Aug 9, 2017

Thanks for the information and following up on this. I will take a look at the example to see if we can get source maps going. In case it is an issue, I've opened up ethul/purs-loader#101

@ethul ethul reopened this Aug 9, 2017
@ethul
Copy link
Owner

ethul commented Aug 12, 2017

I've added source map support in the loader with version 3.1.0. The source-map-loader is not required for source map support. I have an example branch:

https://github.com/ethul/purescript-webpack-example/tree/source-maps

If anyone has a chance to give it a try, that would be great!

Closing this for now. We can reopen if there are more issues with source maps.

@ethul ethul closed this as completed Aug 12, 2017
@paulyoung
Copy link

This worked for me, although the source maps weren't as interactive as I'd hoped. Thanks!

@nwolverson
Copy link
Author

@paulyoung What do you mean interactive? If you can identify specific deficiencies it's probably something that needs to be fixed upstream in the compiler, but won't happen without such input

@paulyoung
Copy link

@nwolverson I meant that I wasn't able to hover over names of things and see their values, like I can when debugging JavaScript.

It also didn't seem possible to set a "nested" breakpoint like I can in JavaScript, which is useful for curried functions.

@paulyoung
Copy link

I've just come across some "nested" breakpoints, so not sure what changed there.

@paulyoung
Copy link

I am able to hover over things but the tooltips all show "ReferenceError: x is not defined"

@paulyoung
Copy link

Actually, some things that are in scope have information equivalent to debugging in JS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants