Commit graph

90 commits

Author SHA1 Message Date
Pavel Minaev
8b4c40e922 Rename ptvsd -> debugpy. 2020-01-17 11:57:13 -08:00
Pavel Minaev
0076925d17 Improve test logging on session exit. 2019-12-13 18:37:56 -08:00
Pavel Minaev
eb50bc29df Disable attach tests on macOS + Python 3.6 due to #1967
Gracefully handle server abruptly disconnecting from adapter for the initial connection.

Fix test_exclude_rules to wait until debuggee terminates.
2019-12-13 18:37:56 -08:00
Pavel Minaev
a654c9834f Fix #1983: Attach to process: Support pid sent as a string from the extension
Allow "processId" in "attach" request to be a string, if it can be parsed as int.
2019-12-13 18:37:56 -08:00
Pavel Minaev
3b71a1257a Fix ptvsd telemetry event check in tests. 2019-12-13 12:29:34 -08:00
Pavel Minaev
e9a5b68054 Simplify options handling. 2019-12-11 20:42:01 -08:00
Pavel Minaev
a3acba68d5 Tweak test log formatting to match adapter logs, and reset session ID between tests. 2019-12-08 14:13:58 -08:00
Pavel Minaev
b23031b773 Disable "redirectOutput" in tests by default. 2019-12-08 14:13:58 -08:00
Pavel Minaev
c545ccb5f8 Fix and re-enable test_reattach. 2019-12-04 09:32:59 -08:00
Pavel Minaev
4fb41ca083 Disable attach_to_pid tests on MacOS + Python 2.7 (#1916) 2019-11-19 12:05:57 -08:00
Pavel Minaev
75a7417e87 Disable attach_by_pid(wait=True) tests on Win32 and Mac due to #1926 2019-11-19 12:05:57 -08:00
Pavel Minaev
bc40fef197 Fix attach_by_pid test runner not properly waiting before running debuggee code. 2019-11-19 12:05:57 -08:00
Pavel Minaev
36485c02c6 Fix #1884: Use sys.platform over platform.system() 2019-11-19 12:05:57 -08:00
Pavel Minaev
ca8e6a137b Reduce default test matrix to avoid redundant tests. 2019-11-19 12:05:57 -08:00
Pavel Minaev
fb6d35ebea Improve failed test diagnostics. 2019-11-18 13:50:14 -08:00
Pavel Minaev
9b34bc0dac Fix #1918: ptvsd port conflicts in test runs 2019-11-15 11:55:27 -08:00
Pavel Minaev
3fc156ca32 Disable attach-to-PID tests on Travis due to #1915. 2019-11-15 11:55:27 -08:00
Pavel Minaev
646981e4af Fix #1810: tests using attach_by_pid fail on Linux and macOS
Add time.sleep() to attach_by_pid spinning loop to give the injected code a better chance to execute.

Read and log injector output to prevent it from blocking on prints.

Improve code injection logging.

Fix race between socket.accept() backchannel listener thread, and debug.Session.close().
2019-11-15 11:55:27 -08:00
Pavel Minaev
173f9b3a48 Fix race condition in backchannel socket cleanup. 2019-11-12 18:13:25 -08:00
Pavel Minaev
095e5bcd5c Fix #1713: Adapter: multiple concurrent sessions 2019-10-30 17:12:17 -07:00
Pavel Minaev
b2111b93ca Switch test output capture to use os.pipe(). Fixes #1819. 2019-10-16 11:44:17 -07:00
Pavel Minaev
b3f0265785 Place pydevd log file in debug.Session log directory, for better handling of multi-session (e.g. multiproc) tests.
Always log to disk for test runs, and dump all ptvsd and pydevd logs on test failures and timeouts.
2019-10-16 11:44:17 -07:00
Fabio Zadrozny
c0108c08b5 Use pid for files created in pydevd logging. Fixes #1831 2019-10-15 08:30:36 -03:00
Karthik Nadig
c6cee270ca
Reverse the connection direction used by enable attach internals. (#1833)
* Minor cleanup
* Reverse the direction used by enable attach internals.
* Handle occasional Invalid argument
2019-10-08 22:24:27 -07:00
Karthik Nadig
ffc6306d8b
Updating telemetry and some comments (#1825)
* Change version field name in telemetry
* Add info on where to set justMyCode
* Address comments.
2019-10-03 20:30:05 -07:00
Pavel Minaev
89be0d1fce Reformat tests. 2019-10-03 18:31:37 -07:00
Pavel Minaev
5f11b7580e Improve reporting of captured multiline debuggee output in tests. 2019-10-03 18:31:37 -07:00
Pavel Minaev
a1ba6f22a5 Fix debug.Session hanging on failed test if debuggee is still alive. 2019-10-03 18:31:37 -07:00
Pavel Minaev
ca56bf70ba Disable Python stdio buffering when spawning processes in tests. 2019-09-30 22:01:27 -07:00
Pavel Minaev
2bf8f582b2 Disable attach_by_pid where applicable (#1810, #1811). 2019-09-30 04:41:10 -07:00
Pavel Minaev
897ffc566b Fix code coverage not being disabled in debuggee process in tests. 2019-09-30 04:41:10 -07:00
Pavel Minaev
42cd8a8367 Fix tests for Python 2.7. 2019-09-30 04:41:10 -07:00
Pavel Minaev
cd5ebd1274 Add safety checks to debug test framework to prevent accidental misuse. 2019-09-27 18:07:50 -07:00
Pavel Minaev
8f358d6e0f Refactor tests.debug to accommodate ptvsd.server spawning the adapter, and remove the need for "custom_client" and "custom_server" start methods.
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.
2019-09-26 13:20:26 -07:00
Pavel Minaev
0825dbeb37 Add code coverage for tests (excluding ptvsd.server and pydevd).
Fix some issues on Python 2.7.

Remove dead code.
2019-09-18 21:42:51 -07:00
Pavel Minaev
bb4bc24abf Don't try to gracefully disconnect from the adapter if test fails. 2019-09-13 11:05:41 -07:00
Pavel Minaev
b6d23c4356 test_exception fixes. 2019-09-12 22:33:26 -07:00
Pavel Minaev
8ab0d0d0d6 Fix multiprocessing in Django and Flask tests. 2019-09-12 22:33:26 -07:00
Pavel Minaev
eb1bb4dd5b Test fixes. 2019-09-11 20:12:12 -07:00
Pavel Minaev
340942aafc Fix #1695: Handle IDE, launcher, debug server, and no-debug disconnect
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.
2019-09-10 15:12:23 -07:00