4 module Puppet::Parser::Functions
5 newfunction(:pry, :type => :statement, :doc => <<-DOC
6 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.
16 raise(Puppet::Error, "pry(): Requires the 'pry' rubygem to use, but it was not found")
19 ## Run `catalog` to see the contents currently compiling catalog
20 ## Run `cd catalog` and `ls` to see catalog methods and instance variables
21 ## Run `@resource_table` to see the current catalog resource table
24 binding.pry # rubocop:disable Lint/Debugger
26 Puppet.warning 'pry(): cowardly refusing to start the debugger on a daemonized master'