parcel-bundler / parcel

The zero configuration build tool for the web. 📦🚀
https://parceljs.org
MIT License
43.38k stars 2.27k forks source link

Elm --debug flag for time travelling debugger #2104

Open Maxim-Filimonov opened 5 years ago

Maxim-Filimonov commented 5 years ago

🙋 feature request

I'd like to be able to see time travelling debugger when using Elm in combination with Parcel. In plain elm it's achieved by passing --debug flag to compiler.

💁 Possible Solution

  1. It can be enabled by default for all development build unless there is some use case where it's not needed.
  2. Or one of Parcel flags can be used to enable this feature

solution 1 - I can do PR for. Solution 2 I need some help to figure out which flags can be used.

domenkozar commented 5 years ago

@Maxim-Filimonov this sounds great, are you planning to reopen that PR?

Maxim-Filimonov commented 5 years ago

At some point - next week is quite full on. Looking for a new job :\ Will try to have a look at this week in November. Feel free to reopen and apply the same changes I did

sasxa commented 5 years ago

Adding options.debug = !options.optimize; before generating compiled output in parse() function works for me.

image

Maxim-Filimonov commented 5 years ago

Merged 🎆

kyasu1 commented 5 years ago

I believe there is a bug in the current elm compiler with --debug option as follows.

https://github.com/elm/compiler/issues/1851

This bug sometimes prevents compiling non-trivial apps. So until when it is resolved by them, could you disable this functionality ?

Or is it possible switch it with a command line option ?

Maxim-Filimonov commented 5 years ago

@kyasu1 just submitted quick PR to disable until compiler issue is resolved.

neurodynamic commented 4 years ago

@kyasu1 just submitted quick PR to disable until compiler issue is resolved.

The --debug issue has been resolved with the release of Elm 0.19.1.