23 ms·
Ruby's pry. Just dropping `binding.pry` anywhere in the code, run it and then get a full REPL with all the variables and instrospect everything with `ls`. This
by roboben 4y ago
Ruby's pry.
Just dropping `binding.pry` anywhere in the code, run it and then get a full REPL with all the variables and instrospect everything with `ls`.
This is why I am still coming back to Ruby and writing everything like it. In most other languages you spend a lot of time actually trying to find a way to debug properly.
Happy to hear recommendations how other languages are doing it. (I know that there are debuggers :P )
- jve 4y agoFor C#/Visual Studio you can attach to a remote computer process and step through code. Lately I learned that the exexuting cursor can actually be moved back/forward and code writtrn while debugger is active (and continue execution). Neat. As of javascript, you can hit F12 right away and dive into debugger for 3rd party site. :)
- teddyh 4y agoPython using IPython: import IPython IPython.embed() Or, using only the Python standard library: import code namespace = globals().copy() namespace.update(locals()) code.interact("", None, namespace)