elm

Does Elm have a debugging function that can print an object to the console?


I would like to be able to examine a runtime javascript object. Can I print an object to the console instead of a string?


Solution

  • Unfortunately, no. All objects are converted to strings before they are sent to the console when you use Debug.log.

    You can however create a function that would output the actual object using the Native layer however, this is an undocumented API and it is advisable to use it only as a last resort.