Wednesday, 15 January 2014

ruby on rails - Pry: "next" command don't work as I expected -


Most of the time I'm trying to debug Pry, whenever I jump to the next line next command, it looks like another frame. For example, check your code:

  items. Where (dst: "book"). Do each. Book | Ott = book.ot est = extract_es_title (ott) if oat! = Zero web_item = Item.find_by (su: GR_BASE_URL + book.id) binding.pry are included in the end class item Monogead :: Document Mogaid :: Timestamp Area: Su, as: source_url field: OT, like :: other_ Title field: DST, as: :: details_structure end  

If I run the code, it stops at the correct breakpoint. However, if I run next in Pry console, then it becomes what gets deeper in the stack rather than jumping on the next line Next :

  645: def yield_document (document, and block) 646: doc = document.respond_to? : _id)? 647: Documents: Factory.frame_db (Class, Document, Criteria. [Option: Field]) 648: Product (Doctor) = & gt; 649: documents.push (Doctor) Is Cashable? 650: End  

Why is this behavior? How can I go to the next method line?

Thanks in advance.

Use the breakpoints:

break 4 Then press CTRL-D or type continue and you should take it to line 4, generally "next row" is considered to be the next line of execution, not The next line of your current file

From Docs:


No comments:

Post a Comment