Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rack-debug19

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rack-debug19

  • 1.4.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Install

$ gem install rack-debug

Rails

config/environments/development.rb

config.gem 'rack-debug' config.middleware.use 'Rack::Debug'

RAILS_ROOT/Rakefile

require 'rack-debug/tasks'

Middleware

add a use line to your builder

require 'rack/debug' Rack::Builder.new do use Rack::Debug run MyApp.new end

can optionally specify where to put the sockets

use Rack::Debug, :socket_path => '/tmp/rack-debug'

Rakefile

require 'rack-debug/tasks'

Add breakpoints to your code

@user = User.find(params[:id]) debugger render :show

Debugging:

run the rake task,

$ rake debug Connected.

refresh a page in your browser, your app will break at debugger statements

(rdb:1) p @user #<User id: 1, name: "David Dollar", email: "ddollar@gmail.com", created_at: "...", updated_at: "...">

can specify the socket path

SOCKET_PATH=/tmp/rack-debug rake debug

Meta:

Author/Maintainer: David Dollar

Patches contributed by: Bart Teeuwisse

Thanks to:

Rack::Bug for a good example of Rack middleware in Rails Ben Scofield for making me want to build some Rack middleware

FAQs

Package last updated on 11 May 2010

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc