Book Image

Rake Task Management Essentials

By : Andrey Koleshko
Book Image

Rake Task Management Essentials

By: Andrey Koleshko

Overview of this book

Table of Contents (18 chapters)
Rake Task Management Essentials
About the Author
About the Reviewers

Using the Ruby approach to debug a Rake project

As you already know that a Rake project is a Ruby project; therefore, all manipulations that you may use with a Ruby project can be applied to Rake project. So, you are able to use general debuggers from the Ruby world.

Currently, there are two tools to debug the Ruby code: debugger and pry. While these tools may be used for the debugging process, they are slightly different type of tools: the debugger tool is specifically a debugger in many programming languages, but the pry tool is an improved console that is designed to work in multiple contexts, including the applications running in the background. We can use either as per our requirement. The idea is the same for both of these tools, and the following steps will be performed for each:

  1. Install the tool.

  2. Add a breakpoint.

  3. Run a rake task. The code will be paused on the breakpoint.

  4. Investigate the environment.


    debugger and pry are third-party tools. You can find more information about them...