4 ms·
This seems to leave out the existence of debuggers in IDEs. These days I tend to run most new code in the debugger, and step through it so I can see what’s goi
by zen21 4y ago
This seems to leave out the existence of debuggers in IDEs.
These days I tend to run most new code in the debugger, and step through it so I can see what’s going on. This works great in say, Rust, Python, or Swift. I haven’t used Java for a while, but I don’t see why it wouldn’t work well there too.
I feel very connected to the code.
- dimitar 4y agoThe author does mention debuggers. But you don't normally run a debugger on production or a testing environment and with a REPL you can. A debugger situates a program differently than it is normally used, a REPL connects to your code/state/environment in any stage of development.
- synthc 4y agoI would also not normally connect to a REPL in a production environment, but it can come in handy. One can certainly attach a debugger to a running process in production, I've done it several times to debug gnarly issues.
- tonyarkles 4y agoI’ve done it in Elixir a handful of times to try to understand a bug that I couldn’t reproduce in my dev environment. And a few times to run some queries for a client and dump them out to CSV.
- fud101 4y agoYou used an elixir debugger on production?
- tonyarkles 4y agoElixir REPL in production yeah. Not to modify anything, but to inspect the state of the world and figure out why some OTP apps were dying. I'm drawing a blank on the name of the build tool, but the "launch binary" it produces has an option to fire up a second copy of your app, keep the console alive, and connect it to the cluster as another node. Worked like a charm, although it's something I wouldn't want to do on a regular basis :)
- ballpark 4y agoI used the Cider debugger with Clojure with some success, but as I got better at REPL-driven development I ultimately stopped firing up the debugger
- synthc 4y agoTrue, for Java and Kotlin I use the debugger in IntelliJ like a REPL all the time. You can even evaluate arbitrary expressions, connect to running applications even applications running on another machine. It's not as powerful as a proper lisp repl as you cannot redefine functions or classes, but it is still very useful.