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