Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/debug/server_dap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ def process_dap args
next if i < start_frame

path = frame.realpath || frame.path
next if skip_path?(path)
next if skip_path?(path) && !SESSION.stop_stepping?(path, frame.location.lineno, SESSION.subsession_id)
break if (levels -= 1) < 0
source_name = path ? File.basename(path) : frame.location.to_s

Expand Down
16 changes: 16 additions & 0 deletions test/protocol/call_stack_with_skip_dap_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,21 @@ def test_it_skips_a_path
ensure
ENV['RUBY_DEBUG_SKIP_PATH'] = nil
end

def test_it_does_not_skip_a_path_if_there_is_a_breakpoint
with_extra_tempfile do |extra_file|
ENV['RUBY_DEBUG_SKIP_PATH'] = extra_file.path
run_protocol_scenario(program(extra_file.path), cdp: false) do
req_add_breakpoint 2, path: extra_file.path
req_continue

assert_equal([File.basename(extra_file.path), File.basename(temp_file_path)], req_stacktrace_file_names)

req_terminate_debuggee
end
end
ensure
ENV['RUBY_DEBUG_SKIP_PATH'] = nil
end
end
end