PDK
To use with the pdk you can just add the puppet-debugger
gem to your Gemfile or .sync.yml file.
You won’t need this line as it is included by default in the pdk gems.
# .sync.yml
Gemfile:
required:
':development':
- gem: "puppet-debugger"
version: "~> 1.6"
pdk update
pdk bundle exec puppet debugger
Example invocation
➜ puppetlabs-stdlib ✗ pdk bundle exec puppet debugger
Ruby Version: 3.2.8
Puppet Version: 8.10.0
Puppet Debugger Version: 1.6.0
Created by: NWOps <corey@nwops.io>
Type "commands" for a list of debugger commands
or "help" to show the help screen.
1:>>
Wanna see custom facts you wrote? You will need to pass in your local module path and run the debugger without facterdb like so:
pdk bundle exec puppet debugger --no-facterdb --modulepath=modules:site:./spec/fixtures/modules/