4 module Puppet::Parser::Functions
5 newfunction(:pry, :type => :statement, :doc => <<-DOC
7 This function invokes a pry debugging session in the current scope object.
8 This is useful for debugging manifest code at specific points during a compilation.
22 raise(Puppet::Error, "pry(): Requires the 'pry' rubygem to use, but it was not found")
25 ## Run `catalog` to see the contents currently compiling catalog
26 ## Run `cd catalog` and `ls` to see catalog methods and instance variables
27 ## Run `@resource_table` to see the current catalog resource table
30 binding.pry # rubocop:disable Lint/Debugger
32 Puppet.warning 'pry(): cowardly refusing to start the debugger on a daemonized master'