💤Introduction
In this article we will learn about Developer information in Puppet. It is a system management tool that centralizes and automates configuration management. Puppet can also be used to deploy software. It is open-source configuration management , that is widely used for server configuration, management, deployment, and orchestration of various applications and services across an organization's entire infrastructure.

Let’s Start!
💤Developer debugging
As Puppet Server runs both Clojure and Ruby code, debugging approaches vary depending on which part of the application we are interested in.

👤Debugging Clojure Code
There are numerous options for debugging the web service layer or other Clojure-written parts of the app. The Clojure REPL is frequently the most useful tool because it makes interacting with individual functions and namespaces so simple.
There are numerous options for more traditional debugging capabilities, such as defining breakpoints and stepping through the lines of your source code. To some extent, any Java debugging tool will work, but Clojure-specific tools like CDT and debug-repl will integrate better with your Clojure source files.
👤Debugging Ruby Code
Debugging Ruby code in Puppet Server can be more difficult because Java and Clojure debugging tools will only take you into the JRuby interpreter source code, not the Ruby code that it is processing. So, if you want to debug Ruby code directly, you'll need to install gems and use their capabilities.
👤Ruby REPL incompatible with Lein REPL
Please keep in mind that a Ruby REPL is incompatible with lein repl because JRuby does not accept data from standard input when running inside of lein repl. To use a ruby REPL while developing, start puppetserver from source with lein run rather than lein repl:
$ lein run --config ~/.puppetserver/puppetserver.conf
The lein run command will start the server normally in the foreground. When the relevant statement is reached, pry or ruby-debug will display an input prompt. In contrast to lein repl, which displays a prompt early in the process lifecycle, expect to see the normal lein run output followed by the Ruby REPL. In this sense, the "ruby repl" is more of a breakpoint than a Clojure REPL.
👤ruby-debug

🌞Installation
There are numerous gems available that provide different methods of debugging Ruby code depending on the version of Ruby and the Ruby interpreter you're using. Ruby-debug is a popular gem, and there is a JRuby-compatible version available. Run the following command to install it for use in Puppet Server:
$ sudo puppetserver gem install ruby-debug
Alternatively, if you're running puppetserver from source:
$ lein gem -c /path/to/puppetserver.conf install ruby-debug
🌞Usage
After installing the gem, you can invoke the debugger by adding the following line to any Ruby code running in Puppet Server (including the Puppet Ruby code):
require 'ruby-debug'; debugger
👤Pry
🌞Installation
Pry is another well-known gem for inspecting Ruby code. It is JRuby-compatible. Install pry when running a packaged version of puppetserver by doing the following:
$ sudo puppetserver gem install pry --no-ri --no-rdoc
Alternatively, if you're running puppetserver from source:
$ lein gem -c ~/puppetserver/puppetserver.conf -- install pry \
--no-ri --no-rdoc
🌞Usage
To use the pry repl, puppetserver should be running in the foreground. The puppet foreground subcommand is used to stop the background service and start the server in the foreground:
$ sudo service puppetserver stop
$ sudo puppetserver foreground
After installing, add the following line to the Ruby code:
require 'pry'; binding.pry
This will display an advanced interactive REPL at the line of code where pry was called.
👤Limitations
We are aware that some popular ruby debugging gems/tools/features do not currently work with JRuby/Puppet Server. It's important to us that the Ruby developer experience isn't hampered for developers who use Puppet Server rather than webrick, so if you run into problems like this, please file an issue on our Bug Tracker, and we'll see if we can add support for what we're missing.
In many cases, it may be as simple as submitting a JRuby patch or a JRuby-compatibility patch for an existing gem, and we are eager to assist with such requests whenever possible.





