Comments (10)
Googling for "elm breakpoints", I didn't find much. But I found a few posts on the google groups for Elm. One user summarizes my biggest reservation about using Elm in production-scale web apps:
Elm, as great as it is, doesn't save you from debugging every once in a while. The one option we have now, is logging. Logging is great, but it can quickly become painful in loops. Since Elm compiles to a single JS file with long mangled names, setting a breakpoint from the code would sometimes be the simplest way to properly debug your code. The generated JS isn't that hard to understand either, it's a series of vars and function calls for the most part.
from learn-elm.
It seems that more debugging tools will be available also on the next version of elm (0.18): https://youtu.be/DSjbTC-hvqQ?list=PLglJM3BYAMPH2zuz1nbKHQyeawE4SN0Cd&t=1633
from learn-elm.
@nelsonic yeah if I remember correctly that was the inspiration for the redux dev tools, which do essentially the same thing, though in my experience with a complex app with a high volume of events, it was quite slow :(
And the time traveling debugger is great but it's only half of the battle; what's missing from that demo is putting breakpoints in the code and stepping through to see what went wrong when some action was mishandled.
from learn-elm.
@nelsonic surprisingly Evan Czaplicki claims that few companies in production have much of a need for source maps so they aren't a priority right now. I don't yet understand what about Elm enables them to avoid using any source maps. I asked him about it in that thread.
from learn-elm.
Yes, importing/exporting history is very helpful and fortunately possible with Redux as well.
from learn-elm.
@jedwards1211 really good question! (thank you for asking it!)
I think debugging
is where elm-lang
truly shines...! see: http://debug.elm-lang.org/
In fact if the elm debugger
was available for JS/IE (let's face it Internet Explorer is still where most of our time consuming bugs are...!) it would make my life (debugging other people's code) so much better!
But, the only way we can show the power of the elm debugging experience is with a video ...
For a micro-intro to "Elm Reactor" see: elm-reactor: a Time Travelling Debugger https://youtu.be/vS3yzUo7l8Y
If you want to have your mind blown watch "Code is the Easy Part" by @evancz where he demos the next iteration of the Elm debugger: https://youtu.be/DSjbTC-hvqQ?t=27m17s
from learn-elm.
@jedwards1211 thank you so much for digging into the debugging "story"... ❤️ ✅
from learn-elm.
@SimonLab yeah, v0.18
looks very promising from a Debugging (& "QA") perspective. 😉
I think @jedwards1211 was more focussed on the ability to use "break points" in the code and step through it: https://developers.google.com/web/tools/chrome-devtools/javascript/add-breakpoints
But in my (probably naive) view writing smaller ("pure") functions and having a (really) smart compiler that looks for typos and type errors will go a long way toward improving the debugging story ... while this does not directly answer the question @jedwards1211 originally asked - and I think we should continue
to ask it - I'm still optimistic ... 🌈
from learn-elm.
@jedwards1211 this might interest you: http://elm-lang.org/blog/the-perfect-bug-report 🤔
from learn-elm.
@jedwards1211, indeed, Dan Abramov did a great job of "porting" the elm debugger to Redux. 😉
from learn-elm.
Related Issues (20)
- Andy Balaam “Elm Makes Me Happy”
- "Complex Animations Done Well" by Sam Rowe
- Andrew MacMurray’s talk at Elm Conf! HOT 1
- Robot buttons from Mars
- A nice app on Elm street by Maxime Fabre
- Elm 0.19.1
- Building UIs in the Dark (Richard Feldman Øredev 2018)
- Forget CSS and enjoy creating UIs in pure Elm HOT 7
- Beginner's Guide to Building Web Applications in Elm (Jesse Warden April 2019)
- Updating Richard Feldman's Frontend Masters course links HOT 3
- Web Development with Elm LinkedIn Learning Course [FREE!] HOT 1
- Can I get a Job writing Elm?
- Want to learn more elm-ui by building a real-world App?
- What is "npm install" ? HOT 3
- elm-spa single page apps made easy HOT 2
- using elm-live with SPA
- "Facilitating Technology Change Through Cultural Change" by Grant Maki (Ford Motors)
- update readme links
- update links
- "The Economics of Programming Languages" by Evan Czaplicki HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from learn-elm.