Skip to content

Instantly share code, notes, and snippets.

@FooBarWidget
Created July 26, 2012 09:10
Show Gist options
  • Save FooBarWidget/3181138 to your computer and use it in GitHub Desktop.
Save FooBarWidget/3181138 to your computer and use it in GitHub Desktop.

Our live IRB and debugging console provide easy ways to introspect, to debug and to modify your application during runtime.

Ever wondered what your application is doing? Maybe the state is not obvious from the log files or the status screens, and you want to inspect the program state directly. Phusion Passenger Enterprise can help you, so let's see how it works.

So here you have a hello world application, which just prints a message with a counter value. On every request, the counter is increment by 1. And here you see it in action.

We use the passenger-status tool to find the PID our application, which we then pass to the passenger-irb command. And there we go. Let's introspect and change the value of the $processed global variable. And it works, it's this simple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment