Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Handle IDE, launcher, debug server, and no-debug disconnect #1695

Closed
karthiknadig opened this issue Aug 16, 2019 · 1 comment
Closed

Handle IDE, launcher, debug server, and no-debug disconnect #1695

karthiknadig opened this issue Aug 16, 2019 · 1 comment
Assignees
Labels
Milestone

Comments

@karthiknadig
Copy link
Member

No description provided.

@int19h
Copy link
Contributor

int19h commented Aug 16, 2019

At this point, we have three ways the debug session can end, with some further variations below:

  1. IDE ends it:
    • by sending "disconnect" or "terminate";
    • by closing the message channel.
  2. Debug server ends it:
    • by reporting "exited";
    • by closing the message channel.
  3. Debuggee process ends it, by exiting.

Some of these are not entirely independent. For example, in the case where there is a debug server connection, the debuggee process exiting will cause the message channel to close, and so this can be handled under that item. But in any no-debug case, and also in the regular debug case where the debuggee process dies before we get a chance to establish a channel to the debug server inside of it, the last item is its own thing.

There's code in adapter to handle all the various situations covered the first two items, and partially the third one. However, this code is rather disorganized, and hard to follow, because it is split across several different handlers for the corresponding events. It is also completely unable to handle the no-debug case.

This needs to be reorganized such that it is all in a single place that orchestrates the proper termination sequence between all the components that are still connected. This approach would also then fix no-debug.

@int19h int19h self-assigned this Aug 16, 2019
@Anapo14 Anapo14 modified the milestones: Aug 2019.2, September 2019.1 Sep 4, 2019
@int19h int19h changed the title Handle ide, debug server, and no-debug disconnect Handle IDE, launcher, debug server, and no-debug disconnect Sep 4, 2019
int19h added a commit to int19h/ptvsd that referenced this issue Sep 6, 2019
…disconnect

Fix microsoft#1721 "runInTerminal" is broken on non-Windows platforms.

Fix microsoft#1722: Output is not captured in "noDebug" with "runInTerminal"

Groundwork for microsoft#1713: adapter: multiple concurrent sessions

Move "launch" request parsing and debuggee process spawning, PID reporting and tracking, stdio "output" capture, and exit code reporting into launcher. Launcher now communicates to the adapter via a full-fledged message channel.

Refactor adapter. Add an abstraction for a debug session, and treat IDE, launcher, and debug server as separate components managed by that session.

Improve adapter logging to capture information about current debug session, and current message handler if any.

Fix reporting exceptions from message handlers.
int19h added a commit to int19h/ptvsd that referenced this issue Sep 7, 2019
…disconnect

Fix microsoft#1721 "runInTerminal" is broken on non-Windows platforms.

Fix microsoft#1722: Output is not captured in "noDebug" with "runInTerminal"

Groundwork for microsoft#1713: adapter: multiple concurrent sessions

Move "launch" request parsing and debuggee process spawning, PID reporting and tracking, stdio "output" capture, and exit code reporting into launcher. Launcher now communicates to the adapter via a full-fledged message channel.

Refactor adapter. Add an abstraction for a debug session, and treat IDE, launcher, and debug server as separate components managed by that session.

Improve adapter logging to capture information about current debug session, and current message handler if any.

Fix reporting exceptions from message handlers.
int19h added a commit to int19h/ptvsd that referenced this issue Sep 8, 2019
…disconnect

Fix microsoft#1721 "runInTerminal" is broken on non-Windows platforms.

Fix microsoft#1722: Output is not captured in "noDebug" with "runInTerminal"

Groundwork for microsoft#1713: adapter: multiple concurrent sessions

Move "launch" request parsing and debuggee process spawning, PID reporting and tracking, stdio "output" capture, and exit code reporting into launcher. Launcher now communicates to the adapter via a full-fledged message channel.

Refactor adapter. Add an abstraction for a debug session, and treat IDE, launcher, and debug server as separate components managed by that session.

Improve adapter logging to capture information about current debug session, and current message handler if any.

Fix reporting exceptions from message handlers.
int19h added a commit to int19h/ptvsd that referenced this issue Sep 10, 2019
…disconnect

Fix microsoft#1721 "runInTerminal" is broken on non-Windows platforms.

Fix microsoft#1722: Output is not captured in "noDebug" with "runInTerminal"

Groundwork for microsoft#1713: adapter: multiple concurrent sessions

Move "launch" request parsing and debuggee process spawning, PID reporting and tracking, stdio "output" capture, and exit code reporting into launcher. Launcher now communicates to the adapter via a full-fledged message channel.

Refactor adapter. Add an abstraction for a debug session, and treat IDE, launcher, and debug server as separate components managed by that session.

Improve adapter logging to capture information about current debug session, and current message handler if any.

Fix reporting exceptions from message handlers.

Various test fixes.
int19h added a commit to int19h/ptvsd that referenced this issue Sep 10, 2019
…disconnect

Fix microsoft#1721 "runInTerminal" is broken on non-Windows platforms.

Fix microsoft#1722: Output is not captured in "noDebug" with "runInTerminal"

Groundwork for microsoft#1713: adapter: multiple concurrent sessions

Move "launch" request parsing and debuggee process spawning, PID reporting and tracking, stdio "output" capture, and exit code reporting into launcher. Launcher now communicates to the adapter via a full-fledged message channel.

Refactor adapter. Add an abstraction for a debug session, and treat IDE, launcher, and debug server as separate components managed by that session.

Improve adapter logging to capture information about current debug session, and current message handler if any.

Fix reporting exceptions from message handlers.

Various test fixes.
int19h added a commit to int19h/ptvsd that referenced this issue Sep 10, 2019
…disconnect

Fix microsoft#1721 "runInTerminal" is broken on non-Windows platforms.

Fix microsoft#1722: Output is not captured in "noDebug" with "runInTerminal"

Groundwork for microsoft#1713: adapter: multiple concurrent sessions

Move "launch" request parsing and debuggee process spawning, PID reporting and tracking, stdio "output" capture, and exit code reporting into launcher. Launcher now communicates to the adapter via a full-fledged message channel.

Refactor adapter. Add an abstraction for a debug session, and treat IDE, launcher, and debug server as separate components managed by that session.

Improve adapter logging to capture information about current debug session, and current message handler if any.

Fix reporting exceptions from message handlers.

Various test fixes.
int19h added a commit to int19h/ptvsd that referenced this issue Sep 10, 2019
…disconnect

Fix microsoft#1721 "runInTerminal" is broken on non-Windows platforms.

Fix microsoft#1722: Output is not captured in "noDebug" with "runInTerminal"

Groundwork for microsoft#1713: adapter: multiple concurrent sessions

Move "launch" request parsing and debuggee process spawning, PID reporting and tracking, stdio "output" capture, and exit code reporting into launcher. Launcher now communicates to the adapter via a full-fledged message channel.

Refactor adapter. Add an abstraction for a debug session, and treat IDE, launcher, and debug server as separate components managed by that session.

Improve adapter logging to capture information about current debug session, and current message handler if any.

Fix reporting exceptions from message handlers.

Various test fixes.
int19h added a commit to int19h/ptvsd that referenced this issue Sep 10, 2019
…disconnect

Fix microsoft#1721 "runInTerminal" is broken on non-Windows platforms.

Fix microsoft#1722: Output is not captured in "noDebug" with "runInTerminal"

Groundwork for microsoft#1713: adapter: multiple concurrent sessions

Move "launch" request parsing and debuggee process spawning, PID reporting and tracking, stdio "output" capture, and exit code reporting into launcher. Launcher now communicates to the adapter via a full-fledged message channel.

Refactor adapter. Add an abstraction for a debug session, and treat IDE, launcher, and debug server as separate components managed by that session.

Improve adapter logging to capture information about current debug session, and current message handler if any.

Fix reporting exceptions from message handlers.

Various test fixes.
int19h added a commit to int19h/ptvsd that referenced this issue Sep 10, 2019
…disconnect

Fix microsoft#1721 "runInTerminal" is broken on non-Windows platforms.

Fix microsoft#1722: Output is not captured in "noDebug" with "runInTerminal"

Groundwork for microsoft#1713: adapter: multiple concurrent sessions

Move "launch" request parsing and debuggee process spawning, PID reporting and tracking, stdio "output" capture, and exit code reporting into launcher. Launcher now communicates to the adapter via a full-fledged message channel.

Refactor adapter. Add an abstraction for a debug session, and treat IDE, launcher, and debug server as separate components managed by that session.

Improve adapter logging to capture information about current debug session, and current message handler if any.

Fix reporting exceptions from message handlers.

Various test fixes.
int19h added a commit to int19h/ptvsd that referenced this issue Sep 10, 2019
…disconnect

Fix microsoft#1721 "runInTerminal" is broken on non-Windows platforms.

Fix microsoft#1722: Output is not captured in "noDebug" with "runInTerminal"

Groundwork for microsoft#1713: adapter: multiple concurrent sessions

Move "launch" request parsing and debuggee process spawning, PID reporting and tracking, stdio "output" capture, and exit code reporting into launcher. Launcher now communicates to the adapter via a full-fledged message channel.

Refactor adapter. Add an abstraction for a debug session, and treat IDE, launcher, and debug server as separate components managed by that session.

Improve adapter logging to capture information about current debug session, and current message handler if any.

Fix reporting exceptions from message handlers.

Various test fixes.
int19h added a commit that referenced this issue Sep 10, 2019
Fix #1721 "runInTerminal" is broken on non-Windows platforms.

Fix #1722: Output is not captured in "noDebug" with "runInTerminal"

Groundwork for #1713: adapter: multiple concurrent sessions

Move "launch" request parsing and debuggee process spawning, PID reporting and tracking, stdio "output" capture, and exit code reporting into launcher. Launcher now communicates to the adapter via a full-fledged message channel.

Refactor adapter. Add an abstraction for a debug session, and treat IDE, launcher, and debug server as separate components managed by that session.

Improve adapter logging to capture information about current debug session, and current message handler if any.

Fix reporting exceptions from message handlers.

Various test fixes.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants