You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.markdown
+14
Original file line number
Diff line number
Diff line change
@@ -851,6 +851,20 @@ For example:
851
851
852
852
*Type*: rvalue.
853
853
854
+
#### `pry`
855
+
856
+
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. Should only be used when running `puppet apply` or running a puppet master in the foreground. This requires the `pry` gem to be installed in puppet's rubygems.
857
+
858
+
*Examples:*
859
+
```puppet
860
+
pry()
861
+
```
862
+
Once in a pry session, some interesting commands:
863
+
864
+
* Run `catalog` to see the contents currently compiling catalog
865
+
* Run `cd catalog` and `ls` to see catalog methods and instance variables
866
+
* Run `@resource_table` to see the current catalog resource table
867
+
854
868
#### `assert_private`
855
869
856
870
Sets the current class or definition as private. Calling the class or definition from outside the current module will fail.
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.
8
+
9
+
*Examples:*
10
+
11
+
pry()
12
+
EOS
13
+
)do |arguments|
14
+
begin
15
+
require'pry'
16
+
rescueLoadError
17
+
raise(Puppet::Error,"pry(): Requires the 'pry' rubygem to use, but it was not found")
18
+
end
19
+
#
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
23
+
#
24
+
if $stdout.isatty
25
+
binding.pry# rubocop:disable Lint/Debugger
26
+
else
27
+
Puppet.warning'pry(): cowardly refusing to start the debugger on a daemonized master'
0 commit comments