Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't stop at DAP's connection #640

Closed
wants to merge 2 commits into from
Closed
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
6 changes: 5 additions & 1 deletion lib/debug/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ def initialize
@session = nil
end

def is_dap?
false
end

class Terminate < StandardError; end
class GreetingError < StandardError; end

Expand Down Expand Up @@ -68,7 +72,7 @@ def activate session, on_fork: false
} unless already_connected

setup_interrupt do
pause unless already_connected
pause unless already_connected || is_dap?
process
end

Expand Down
5 changes: 4 additions & 1 deletion lib/debug/server_dap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ def self.local_fs_map_set map
end
end

def is_dap?
true
end

def dap_setup bytes
CONFIG.set_config no_color: true
@seq = 0
Expand Down Expand Up @@ -256,7 +260,6 @@ def process
UI_DAP.local_fs_map_set req.dig('arguments', 'localfs') || req.dig('arguments', 'localfsMap')
when 'attach'
send_response req
Process.kill(UI_ServerBase::TRAP_SIGNAL, Process.pid)
@is_attach = true
UI_DAP.local_fs_map_set req.dig('arguments', 'localfs') || req.dig('arguments', 'localfsMap')
when 'setBreakpoints'
Expand Down
Loading