-
Notifications
You must be signed in to change notification settings - Fork 359
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
expose more debugging features, like console.group #633
Comments
Right now it looks like the
becomes...
|
There is kind of a lot that could be done here. I ended having to write this as a band-aid. https://gist.github.com/Fresheyeball/94e25fcefc517a74382e55283eec9093 But I wouldn't consider it a solution. I'm starting to think Elm should just expose (almost) the entirety of this: https://developer.chrome.com/devtools/docs/console-api . And in two styles (we might want logging for things other than debugging).
and for debugging in a raw way
This way it would be possible for Elm library authors to put together their own debugging packages. |
Sounds like a cool idea! Perhaps we could start working on an |
No go. Elm rejects anything native. It needs to be owned by elm-lang. I'd be happy to take this on, but @evancz would need to bless me for the
|
good idea |
As it stands
Debug.log
is the only thing provided for instrumenting and debugging code in Elm, and it's not usable for all cases.For example, there might be a deeply nested structure represented by the top level
Model
of the application. WithDebug.log
we are given an un-usable display of this complex structure as a single string without even basic indentation.Instead lets make this kick ass. With something much more similar to the experience of logging a native javascript object to the console; where nested structures can be collapsed or expanded.
I believe this can be accomplished using
console.group
, or some similar technique.The text was updated successfully, but these errors were encountered: