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"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.current_remote_serverObject

Returns the value of attribute current_remote_server.



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

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)


27
28
29
30
# File 'lib/pry-byebug/base.rb', line 27

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)


19
20
21
22
# File 'lib/pry-byebug/base.rb', line 19

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