We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 674e0b2 commit 4756121Copy full SHA for 4756121
lib/pry-debugger/breakpoints.rb
@@ -10,11 +10,15 @@ module Breakpoints
10
11
# Add a new breakpoint.
12
def add(file, line, expression = nil)
13
- raise ArgumentError, 'Invalid file!' unless File.exist?(file)
+ if !File.exist?(file) && file != Pry.eval_path
14
+ raise ArgumentError, 'Invalid file!' unless File.exist?(file)
15
+ end
16
validate_expression expression
17
18
Pry.processor.debugging = true
- Debugger.add_breakpoint(File.expand_path(file), line, expression)
19
+
20
+ path = file == Pry.eval_path ? file : File.expand_path(file)
21
+ Debugger.add_breakpoint(path, line, expression)
22
end
23
24
# Change the conditional expression for a breakpoint.
0 commit comments