When using launcher to redirect output, tell pydevd to not perform redirection.
Always propagate "output" events from the server to the IDE.
Fix test_log_point to not assume that logpoint output is strictly ordered wrt regular output.
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.
* Bunch of minor test fixes
* Fix linter and multiproc
* Remove missed os.environ
* Rename and move stop_debugging
* Add evaluate helper
* Add exit_code property
* Enable pytest and flake8 in workspace
* Fix test failure
* Set ptvsd python path in tests
* Rename exit_code to expected_exit_code
Ensure that all captured output is reported to the IDE before reporting process exit.
Correctly report "process", "exited", and "terminated" events for "noDebug".
Don't treat partial message reads as fatal error.
Switch test_nodebug to "internalConsole", so that it can properly produce "output" events.
Expect failure response from "setBreakpoints" in test_nodebug.
Fix environment dict being shared between subsequent test runs, causing spurious enable_attach() in debuggee.
Fix ordering in debuggee and adapter cleanup in debug.Session.
Fix launcher.py on Python 2.7
Move docstrings to top-level package, and update them to reflect the current behavior.
Remove unused code in ptvsd.common.log.
Move sys.path/prefix/site_packages logging into ptvsd.common.log, and log it from adapter and server to the same level of detail as the tests.
Fix injected code snipped for attach-by-PID.
Fix some Unicode issues in adapter and tests.
Refactor Timeline, debug.Session, and start methods.
* noDebug mode support
* Ensure we get the debuggee pid on launch
* Fix state change bug
* Tweaking pid retreival
* Use makefile and simplify pid retreival
* Addressing comments
* Run formatter
* Change name common.socket to common.sockets
* Add some timeouts
* Fix linter
* Initial fix for launch
* Minor fixes
* Succesful launch tests
* More launch test fixes
* Some bit of cleanup
* Fix linter
* More cleanup
* Attach using import
* Fix circular importing
* Support attach via command line
* Backchannel and Other test fixes
* Linter fix
* Python path fix in test
* Fix lint after rebase
* Support exitCode in tests
* More fixes after rebase
* Fix expected exit code
* Remove changes to MessageDict __call__
* Remove hold subprocess event
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.
* Remove wrapper and in-proc support code
* Fixing up multiproc patching
* Address comments
* Import cleanup
* More cleanup
* Remove loopback fast path
* Disable IDE disconnect unpause-ing
* Add missing file to do not trace
Add long_tmpdir fixture, that always supplies a long rather than short path name on Windows.
Use long_tmpdir in the implementation of @pyfile, and in all tests that use tmpdir to generate code.
Implement per-test-runner out-of-process watchdog for processes spawned by tests.
Add file logging for tests and watchdog.
Improve stdio capture in debug.Session when test fails.
Remove redundant logging in debug.Session.
Wait on a breakpoint before checking output.
Add temp workaround for #1574: Flask tests fail with "no such option: --wait" on windows py27
Pin Flask version to last known good one in tests/requirements.txt.
Other fixes and improvements:
Make start_method mandatory for debug.Session to avoid problems with tests forgetting to specify it.
Add debug_me.scratchpad to enable async communication between test code and debuggee.
Improve debug.Session logging.
Improve test_attach.
Reformat various timeline log entries to improve readability.
Add pretty-printing of composite expectations, to match pretty-printed JSON.
Avoid redundant repetitions of messages when explaining how occurrences matched expectations.
Fix Flask and Django multiprocess tests.
Fix test logs not being captured by pytest.
Fix "import debug_me" check improperly applied in tests where it is unnecessary.
Fix some clarifying patterns not respecting the underlying pattern.
Add pattern helpers for strings: starting_with, ending_with, containing.
Move DAP test helpers to a separate module, and add a helper for frames.
Add support for line markers when setting breakpoints and matching frames.
Assorted test fixes around handling of Unicode and paths.
Fix various bugs around handling of disconnect in JsonIOStream and JsonMessageChannel.
Fix handling of DAP "terminated" event in debug.Session.
Add --ptvsd-logs and --pydevd-logs switches to pytest.
Improve message logging to fully capture the raw message data in the logs if deserialization fails.
Log all debuggee environment variables in debug.Session, and improve log readability.
* Replace wait_for_thread_stopped with wait_for_stop
* Switch flask tests to use flask server
* Assert linter
* Use marked lines
* Fix stack logging in tests
* Prevent black from formating some debug code
* Simplify flask tests
* Replace send_request(continue) with send_continue
* fix typo
* Update ANY to some
* Refactor breakpoint lines in tests
* Replace old import and emable debug with debug_me
* Remove unused code
* Fix some linter issues
* Change from some.such_that to some.str.such_that
* Linting with black