4 ms·
One area where Ruby could help improve developer experience is by providing a better debugging experience. I feel incredibly spoiled with Chrome Dev Tools. Mean
by TheAceOfHearts 3y ago
One area where Ruby could help improve developer experience is by providing a better debugging experience. I feel incredibly spoiled with Chrome Dev Tools. Meanwhile the last time I tried debugging heavy metaprogramming Ruby code it was a pain to figure out what was happening.
- volkk 3y agothat's surprising considering `pry`[1] is such an amazing debugger IMO. [1] https://github.com/pry/pry https://github.com/pry/pry
- weaksauce 3y agowhat is ruby debug not able to do that you want it to do? https://github.com/ruby/debug https://github.com/ruby/debug a nice ide integrated experience: https://code.visualstudio.com/docs/languages/ruby#_debugging-support-with-rdbg https://code.visualstudio.com/docs/languages/ruby#_debugging... https://github.com/ruby/vscode-rdbg https://github.com/ruby/vscode-rdbg https://code.visualstudio.com/docs/editor/debugging https://code.visualstudio.com/docs/editor/debugging heavy metaprogramming in any language is going to be a pain to debug so i'm not sure what you're expecting but there are tools to help. you can also call source_location on some method to figure out where things exist.
- SkyPuncher 3y agoMeta programming is my largest complaint with Ruby. It creates huge surprises that are very difficult to inspect and debug.
- jweir 3y agoWe ban most meta programming in our own code. While the meta programming solutions are fun and clever they are often more code than a functional version and hard to maintain. We do allow the occasional use of “send” but try to avoid it. Dynamic method definitions are strictly banned.
- mwgalloway 3y agoRuby 3.3 has made major improvements to the debugging experience: https://railsatscale.com/2023-12-19-irb-for-ruby-3-3/ https://railsatscale.com/2023-12-19-irb-for-ruby-3-3/