Debug multiprocess leads to AttributeError Can't get attribute on <module '__main__
Don't import multiprocessing before running user code.
Use bytes rather than unicode for __main__.__name__ on Python 2.7.
Close stdin, stdout, and stderr in the adapter.
Double-fork() and setsid() on Unix to daemonize properly.
Use CREATE_NEW_PROCESS_GROUP and CREATE_NO_WINDOW on Win32 to daemonize properly.
Propagate socket errors from adapter to server for enable_attach().
Fix#1954: "redirectOutput" property is not respected
If "redirectOutput" is specified, always capture output as UTF-8, and encode it according to locale and Python settings.
Change the default for "redirectOutput" to be false when "console" is not set to "internalConsole", to minimize differences in behavior when running under debugger for most common scenarios.
Refactor ptvsd.launcher package to minimize circular dependencies between modules.
Fix launcher not propagating debuggee exit code.
Fix attach-by-PID without explicit --log-dir overriding PTVSD_LOG_DIR (and disabling logging).
Improve test logging, with a separate directory for every test.
Various test fixes.
Separate message parsing and message handling into separate threads.
Remove nested message handling in request handlers via `yield`, since it is incompatible with the new split model, and replace it with NO_RESPONSE and Request.respond() to defer responses until later.
Change Message.cant_handle() and Message.isnt_valid() to respond to the request and return the exception, instead of raising it, to accommodate NO_RESPONSE scenarios where a failure needs to be reported later.
Fix#1678: Do not rely on "processId" being returned by "runInTerminal" request
Extract debuggee PID from the "process" event sent by the debug server.
Fix#1679: "exited" event sometimes reports "exitCode": null
Report it as -1 if it cannot be retrieved from the debuggee process.
Fix#1680: Fatal errors in message loop do not fail fast
os._exit() immediately if a fatal error occurs in message parsing or message handling background threads.
Fix#1605: Debuggee process lifetime management
Mitigate #1637: log.exception() doesn't capture the full stack
Handle "launch" request, parse and validate the debug configuration, and spawn the debuggee process with debug server.
Track debuggee process and its subprocesses, and kill them as needed.
Refactor Singleton and ThreadSafeSingleton to allow for easier synchronization between IDE and server message handlers without excessive locking.
Fix various corner cases and race conditions in disconnect scenarios.
Make log.exception() log the calling stack, not just the exception stack.
Add JSON property validation to MessageDict.
Add --log-stderr switch to the server to enable full logging to stderr.
Add --cls switch to the adapter to reset terminal before logging anything (for convenience when debugging it).
Add some printf-debugging helpers.