CSC/ECE 517 Fall 2014/ch1a 26 sn: Difference between revisions
Line 6: | Line 6: | ||
__TOC__ | __TOC__ | ||
= Introduction = | = Introduction to Pry debugger = | ||
Pry is an [http://en.wikipedia.org/wiki/Shell_(computing) interactive shell] for the Ruby programming language. It is possible to start Pry at any point inside a running program. Due to the reflective nature of Ruby, this lets the programmer inspect the program, change its current state, or correct the source code without restarting the process. Pry is thus notable for its ability to start a [http://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop REPL] within a running program. | |||
= Commands = | = Commands = |
Revision as of 20:36, 15 September 2014
Debugging in Rails using Pry
Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware, thus making it behave as expected. Few of the debugging techniques are Print debugging (also known as printf debugging), Log debugging and Interactive debugging. Rails provides a range of options to make debugging easier which include debug helpers, loggers, graphical debuggers, Pry, and so on. In the following sections, we would be discussing about debugging in Rails using Pry.
Introduction to Pry debugger
Pry is an interactive shell for the Ruby programming language. It is possible to start Pry at any point inside a running program. Due to the reflective nature of Ruby, this lets the programmer inspect the program, change its current state, or correct the source code without restarting the process. Pry is thus notable for its ability to start a REPL within a running program.