As someone casually observing Elm development, I'm very surprised by this; 
does Elm really make your life so easy you've never needed to set 
breakpoints and step through your code?  It's hard for me to imagine 
writing a large-scale app without having to do that from time to time.

On Saturday, October 22, 2016 at 6:49:52 AM UTC-5, John Orford wrote:
>
> It never occurred to me to debug the generated JS... can you sketch out 
> your use case a bit more?
>
> On Sat, 22 Oct 2016 at 11:19 Robin Heggelund Hansen <[email protected] 
> <javascript:>> wrote:
>
>> While I spend a lot less time debugging in Elm than in JS, sometimes it's 
>> useful to debug the generated Javascript.
>>
>> This would be greatly simplified, if it was possible to add a `debugger;` 
>> statement to the code.
>>
>> What do people think of a new function added to the Debug module of 
>> elm-lang/core, called breakpoint. It would work like the identity function, 
>> but also include the `debugger;` statement, causing a breakpoint to happen 
>> when the browsers dev-tools are open.
>>
>> used like:
>>
>> ```
>> faultyFunction a b =
>>   let
>>      _ = Debug.breakpoint ()
>>   in
>>     a + b
>> ```
>>
>> Granted, this would cause a breakpoint to happen in the actual 
>> Debug.breakpoint function, but since that function is very small, stepping 
>> out of it is no big deal. The only other option I can think of is compiler 
>> support, but I'm unsure how hard this would be to include.
>>
>> Opinions?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Elm Discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to