Commit graph

11 commits

Author SHA1 Message Date
Pavel Minaev
1965b47034 Get rid of fmt() and use idiomatic format() and f"" instead. 2022-04-13 11:38:41 -07:00
Pavel Minaev
e87017e0b3 Remove redundant "from __future__ import ..." 2022-04-13 11:38:41 -07:00
Pavel Minaev
55eac82c96 Fix #1811: tests using attach_by_pid fail on Python 2.7
Don't call enable_attach() and wait_for_attach() while under import lock.
2020-01-26 17:14:30 -08:00
Pavel Minaev
8b4c40e922 Rename ptvsd -> debugpy. 2020-01-17 11:57:13 -08:00
Pavel Minaev
fad3c4f878 Add "from __future__ import division" to all ptvsd modules. 2019-10-30 17:12:17 -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
3908192ce7 Work around import deadlock in enable_attach() on Python 2 (#1788). 2019-09-20 12:50:52 -07:00
Pavel Minaev
e94980f86c Do not load ptvsd.server (and hence, pydevd) unless the subpackage is loaded explicitly or via a public API entrypoint that requires it.
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.
2019-08-18 11:43:23 -07:00
Pavel Minaev
4cd1d4163f Fix #1585: Output tests fail sporadically
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.
2019-07-18 10:13:02 -07:00
Pavel Minaev
c03206972d Fix remaining tests to reflect the debug adapter refactoring changes.
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.
2019-07-11 16:19:06 -07:00
Pavel Minaev
746bda561e Test fixes. 2019-07-09 12:01:13 -07:00