If it helps anyone developing Rails apps or gems, I wrote a shortcut for set_trace_func, so next time you want to just add a line before and after some function you are trying to debug you can have Ruby temporarily output every line, method, etc. executed. Also, it lets you define the format, use other loggers, etc. via a proc/lambda define, since you might not like the default format. Apologize for posting here if it wouldn''t help- maybe you are using a real debugger. Example: In Gemfile add: gem ''autolog'' Around some part of code add this before: Autolog.methods and this after: Autolog.off Hope it helps someone who needs a quick tool periodically without all the time sink of profiling or setting a breakpoint and debugging in a slow IDE. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/VN6FaqP1-XUJ. For more options, visit https://groups.google.com/groups/opt_out.
gsw
2012-Oct-18 19:51 UTC
Re: autolog: easily debug-like logging on the fly in your Rails app
Gem changed a lot from yesterday. It''s a little more like Tracer now: https://github.com/garysweaver/autolog On Wednesday, October 17, 2012 2:32:47 PM UTC-4, gsw wrote:> > If it helps anyone developing Rails apps or gems, I wrote a shortcut for > set_trace_func, so next time you want to just add a line before and after > some function you are trying to debug you can have Ruby temporarily output > every line, method, etc. executed. Also, it lets you define the format, use > other loggers, etc. via a proc/lambda define, since you might not like the > default format. Apologize for posting here if it wouldn''t help- maybe you > are using a real debugger. > > Example: > > In Gemfile add: > gem ''autolog'' > > Around some part of code add this before: > Autolog.methods > and this after: > Autolog.off > > Hope it helps someone who needs a quick tool periodically without all the > time sink of profiling or setting a breakpoint and debugging in a slow IDE.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/GOXu8JCEpH8J. For more options, visit https://groups.google.com/groups/opt_out.
gsw
2012-Oct-19 20:36 UTC
Re: autolog: easily debug-like logging on the fly in your Rails app
autolog v0.2.0 released. didn''t have autolog method on Object''s eigenclass, which meant it wasn''t very helpful outside of main where I''d added it specifically, and I wasn''t doing an ensure on the block execution to turn it off if anything was raised in the block. https://github.com/garysweaver/autolog On Thursday, October 18, 2012 3:51:01 PM UTC-4, gsw wrote:> > Gem changed a lot from yesterday. It''s a little more like Tracer now: > https://github.com/garysweaver/autolog > > On Wednesday, October 17, 2012 2:32:47 PM UTC-4, gsw wrote: >> >> If it helps anyone developing Rails apps or gems, I wrote a shortcut for >> set_trace_func, so next time you want to just add a line before and after >> some function you are trying to debug you can have Ruby temporarily output >> every line, method, etc. executed. Also, it lets you define the format, use >> other loggers, etc. via a proc/lambda define, since you might not like the >> default format. Apologize for posting here if it wouldn''t help- maybe you >> are using a real debugger. >> >> Example: >> >> In Gemfile add: >> gem ''autolog'' >> >> Around some part of code add this before: >> Autolog.methods >> and this after: >> Autolog.off >> >> Hope it helps someone who needs a quick tool periodically without all the >> time sink of profiling or setting a breakpoint and debugging in a slow IDE. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/CRIGvjE7Oz4J. For more options, visit https://groups.google.com/groups/opt_out.
Possibly Parallel Threads
- autolog: set_trace_func without all the typing
- "best practices" for Rails serving RESTful JSON services for use by AngularJS, Ember.js, etc.
- Creating nested hash from nested active record results
- :has_many and :controller specified in routes.rb
- SCCP - max lines per phone limit