File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -1018,11 +1018,16 @@ local function start_debugging(self, request)
10181018 return
10191019 end
10201020
1021- if adapter . type == " executable " then
1022- local session = Session : spawn ( adapter , opts )
1021+ local function on_child_session ( session )
1022+ session . parent = self
10231023 self .children [session .id ] = session
10241024 session :initialize (config )
10251025 self :response (request , {success = true })
1026+ end
1027+
1028+ if adapter .type == " executable" then
1029+ local session = Session :spawn (adapter , opts )
1030+ on_child_session (session )
10261031 elseif adapter .type == " server" then
10271032 local session
10281033 session = Session :connect (adapter , opts , function (err )
@@ -1034,10 +1039,7 @@ local function start_debugging(self, request)
10341039 err
10351040 ), vim .log .levels .WARN )
10361041 elseif session then
1037- session .parent = self
1038- self .children [session .id ] = session
1039- session :initialize (config )
1040- self :response (request , {success = true })
1042+ on_child_session (session )
10411043 end
10421044 end )
10431045 end
You can’t perform that action at this time.
0 commit comments