Time Travel Debugger for v0.17

335 views
Skip to first unread message

Yosuke Torii

unread,
Jun 6, 2016, 4:23:35 AM6/6/16
to Elm Discuss
Hi all,

Is it convenient for you if there would be a new version of Time Travel Debugger for 0.17?
I made a prototype on GitHub (Repository, Demo). (Not published yet.)

Possible feature to be implemented in the future is:
  • format model (e.g. indent, syntax highlight)
  • show diff between before and after msg
  • watch certain property and stop when it is changed
  • form a Cmd tree where the root is user action and has chained Cmds
  • enable to show panel in other place (Currently it is fixed on the right)

Please give me feedback if you are interested :)

Thanks

Claudia Doppioslash

unread,
Jun 6, 2016, 4:54:37 AM6/6/16
to elm-d...@googlegroups.com
Cool stuff, Yosuke!
It''d be really good to have some time travelling back.

Zinggi

unread,
Jun 6, 2016, 8:02:21 AM6/6/16
to Elm Discuss
Wow, this is great!
I also love the fact that this is 100% made with elm, no js at all.
It would be cool if the UI had a time slider, in the spirit of the old time travel debugger.

Maybe you could also add a debugView : Model -> a to TimeTravel.program so that a user can apply a filter to what gets logged.
E.g. debugView = \model -> model.someInner.model

Keep it up!

Mario Sangiorgio

unread,
Jun 6, 2016, 6:00:14 PM6/6/16
to Elm Discuss
This is very promising!

I think this is a simple and very effective solution to the problem. I also like that this is a pure Elm implementation which works on top of reactor but doesn't have any strong dependency on it.

Just a few minutes ago Evan closed this issue on time travelling debugging on the reactor for Elm 0.17. https://github.com/elm-lang/elm-reactor/issues/186
It would be great to discuss with him your implementation, to try to figure out what is missing and to come up with the best design to fill the gaps.

--
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 elm-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yosuke Torii

unread,
Jun 6, 2016, 11:21:01 PM6/6/16
to elm-d...@googlegroups.com
Thank you for all feedback!

About the slider which traditional debugger used to have, I'm not sure it would be used very much in practice. I think pointing exact state is better feature and it is enough for debugging. It looks fancy for demonstration though :)

About logging filtered model, I agree but think it can also be done by UI (and localStorage which Elm does not support yet). I'll try with this way first.

Anyway, I will release this soon. It's very early for practical use but you can easily try it. I hope this implementation would inspire the upcoming official one.



--
You received this message because you are subscribed to a topic in the Google Groups "Elm Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elm-discuss/vtDxwvsL7DE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elm-discuss...@googlegroups.com.

Peter Damoc

unread,
Jun 7, 2016, 2:36:51 AM6/7/16
to Elm Discuss
On Tue, Jun 7, 2016 at 6:20 AM, Yosuke Torii <jinj...@gmail.com> wrote:
About the slider which traditional debugger used to have, I'm not sure it would be used very much in practice.

That slider is the actual reason it was called a Time-Traveling Debugger. One could pause, grab the slider and go back in time. Change some things in the code and see the timeline change. 

It has its uses, especially if you debug animation or game-like programs. 


 

--
There is NO FATE, we are the creators.
blog: http://damoc.ro/

Yosuke Torii

unread,
Jun 7, 2016, 3:00:39 AM6/7/16
to elm-d...@googlegroups.com
Yeah, I know. The time-traveling feature is still alive in my version (by clicking messages). 

But I have little experience of animation or game-like programs. Is slider useful for them?


--

Claudia Doppioslash

unread,
Jun 7, 2016, 4:52:18 AM6/7/16
to elm-d...@googlegroups.com
Yes, it's very useful for games.
Here's why https://youtu.be/wxWM4t68cR4?t=12m in that video the developer is trying to get the character to jump to a specific place by adjusting the gravity. 
So the workflow is changing some code, then waiting for a build to complete, than playing to that point again.
Which is a horrible and slow.


On 7 June 2016 at 08:00, Yosuke Torii <jinj...@gmail.com> wrote:
Yeah, I know. The time-traveling feature is still alive in my version (by clicking messages). 

But I have little experience of animation or game-like programs. Is slider useful for them?

Yosuke Torii

unread,
Jun 7, 2016, 6:24:34 AM6/7/16
to elm-d...@googlegroups.com
Hmm... It seems the most interesting part is hot swapping (which is hard for me to implement). Without hot swapping, the remaining feature is "search some point, play from that point and go toward another future". This makes sense to some extent because you sometimes miss the route, but you cannot fix the behavior.

In this context, let's ask Evan. I recently found it is difficult to modify inline style of all list items at the same time. Hot swapping would also do well for such cases.



--

Claudia Doppioslash

unread,
Jun 7, 2016, 6:29:28 AM6/7/16
to elm-d...@googlegroups.com
Yeah, hot swapping it's very much a necessity for this use.
Did you look into how to implement it?

On 7 June 2016 at 11:24, Yosuke Torii <jinj...@gmail.com> wrote:
Hmm... It seems the most interesting part is hot swapping (which is hard for me to implement). Without hot swapping, the remaining feature is "search some point, play from that point and go toward another future". This makes sense to some extent because you sometimes miss the route, but you cannot fix the behavior.

In this context, let's ask Evan. I recently found it is difficult to modify inline style of all list items at the same time. Hot swapping would also do well for such cases.
 

Gmail

unread,
Jun 7, 2016, 7:05:26 AM6/7/16
to elm-d...@googlegroups.com
Not yet.

I guess it needs some Native code. Considering native, more feature are available such as saving settings via localStorage, opening another window to avoid overlap, etc. But then it cannot be published as a package.

My personal app does not need it for now. My highest priority for now is fix this(https://github.com/jinjor/elm-time-travel/issues/2), terrible :)
--

Fedor Nezhivoi

unread,
Jun 9, 2016, 5:45:22 AM6/9/16
to Elm Discuss
I guess currently we may stay with https://github.com/fluxxu/elm-hot-loader. This of course introduce webpack which is not a great thing, but it may be a workaround for now.

понедельник, 6 июня 2016 г., 14:23:35 UTC+6 пользователь Yosuke Torii написал:

Yosuke Torii

unread,
Jun 10, 2016, 5:08:41 PM6/10/16
to Elm Discuss
Oh, it looks great!

I'll look into it. Thank you :)


2016年6月9日木曜日 18時45分22秒 UTC+9 Fedor Nezhivoi:
Reply all
Reply to author
Forward
0 new messages