Module: PryByebug

Defined in:
lib/pry-byebug/base.rb,
lib/pry-byebug/version.rb,
lib/pry-byebug/commands/up.rb,
lib/pry-byebug/commands/down.rb,
lib/pry-byebug/commands/next.rb,
lib/pry-byebug/commands/step.rb,
lib/pry-byebug/commands/frame.rb,
lib/pry-byebug/commands/finish.rb,
lib/pry-byebug/helpers/location.rb,
lib/pry-byebug/commands/continue.rb,
lib/pry-byebug/commands/exit_all.rb,
lib/pry-byebug/helpers/multiline.rb,
lib/pry-byebug/commands/backtrace.rb,
lib/pry-byebug/helpers/navigation.rb,
lib/pry-byebug/commands/breakpoint.rb,
lib/pry-byebug/helpers/breakpoints.rb

Overview

Main container module for Pry-Byebug functionality

Defined Under Namespace

Modules: Helpers Classes: BacktraceCommand, BreakCommand, ContinueCommand, DownCommand, ExitAllCommand, FinishCommand, FrameCommand, NextCommand, StepCommand, UpCommand

Constant Summary collapse

VERSION =
"3.9.0"

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#current_remote_serverObject

Reference to currently running pry-remote server. Used by the processor.


10
11
12
# File 'lib/pry-byebug/base.rb', line 10

def current_remote_server
  @current_remote_server
end

Class Method Details

.check_file_context(target, msg = nil) ⇒ Object

Ensures that a command is executed in a local file context.

Raises:

  • (Pry::CommandError)

25
26
27
28
# File 'lib/pry-byebug/base.rb', line 25

def check_file_context(target, msg = nil)
  msg ||= "Cannot find local context. Did you use `binding.pry`?"
  raise(Pry::CommandError, msg) unless file_context?(target)
end

.file_context?(target) ⇒ Boolean

Checks that a target binding is in a local file context.

Returns:

  • (Boolean)

17
18
19
20
# File 'lib/pry-byebug/base.rb', line 17

def file_context?(target)
  file = Helpers::Location.current_file(target)
  file == Pry.eval_path || !Pry::Helpers::BaseHelpers.not_a_real_file?(file)
end