Fabio Zadrozny
299dfa75f2
Support for step over and step return with asyncio coroutines. Fixes #1627
2019-12-04 08:03:17 -03:00
Pavel Minaev
346b97bf69
Fix #1938 : Debuggee output is UTF-8 regardless of locale
...
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.
2019-11-27 20:35:58 -08:00
Fabio Zadrozny
5d674c49e5
Properly exit ReaderThread on socket shutdown. Fixes #1942
2019-11-26 11:18:49 -08:00
Pavel Minaev
d8d0eba519
Fix #1950 : Nonsensical error message for type errors in launch.json
...
Use fmt() instead of format() for validation error text.
2019-11-25 16:16:23 -08:00
Fabio Zadrozny
dc950078c1
Fix TypeError on Python 2.7.5. Fixes #1941
2019-11-25 12:01:49 -08:00
Pavel Minaev
ad36606014
Fix #1944 : Debugging fails with timeout when using conda run
...
Do not validate PID of the debuggee when debug server connects while handling "launch".
Restrict "launch" to the first session with no server connections.
2019-11-21 19:30:48 -08:00
Pavel Minaev
bd50356993
Fix #1930 : "launch" doesn't work with venv on Windows and Python 3.7+
...
For "launch", match processes on parent PID as a fallback for PID, to accommodate launcher stubs like py.exe.
2019-11-21 15:21:22 -08:00
Fabio Zadrozny
6ae5b80382
Monkey-patch os.posix_spawn. Fixes #1934
2019-11-21 12:02:21 -08:00
Pavel Minaev
7d160fc0f8
Fix and re-enable Django multiproc test.
2019-11-20 16:15:02 -08:00
Pavel Minaev
270afb8095
Fix #1900 : Ensure that the ptvsd_attach event sets the right name for child processes
2019-11-19 12:59:54 -08:00
Pavel Minaev
64e1a63db4
Adjust test timeout for CI.
2019-11-19 12:05:57 -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
d5fe978d5e
Add ResponseOccurrence.result to alias Response.result
2019-11-18 13:50:14 -08:00
Pavel Minaev
52ebb7ca1f
Fix #1886 : test_flask_breakpoint_multiproc fails with run=attach_by_socket
...
Adjust sys.path before running Flask from the stub script.
2019-11-18 13:50:14 -08:00
Pavel Minaev
fb6d35ebea
Improve failed test diagnostics.
2019-11-18 13:50:14 -08:00
Fabio Zadrozny
3e29307d65
Don't do additional connection on a fork/exec (when called from subprocess). Fixes #1909
2019-11-18 10:38:07 -08:00
Fabio Zadrozny
0bc076c1c6
Ensure attach to pid is bitness agnostic. Fixes #1624
2019-11-18 10:37:42 -08:00
Fabio Zadrozny
078909d1bf
Don't notify about threads before the debugger is ready to run. Fixes #1919
2019-11-15 23:14:55 -08:00
Pavel Minaev
9b34bc0dac
Fix #1918 : ptvsd port conflicts in test runs
2019-11-15 11:55:27 -08:00
Pavel Minaev
11a0d18eaf
Fix #1915 : attach_to_pid tests fail on Travis CI
...
Configure ptrace to give permissions necessary for gdb to attach.
2019-11-15 11:55:27 -08:00
Pavel Minaev
bab70f7427
Make TRAVIS environment variable visible inside Tox.
2019-11-15 11:55:27 -08:00
Pavel Minaev
1240e80924
Tentatively fix #1914 : Sporadic multiproc test failures due to Popen bug
...
Keep a global reference to Popen instance used by debuggee to spawn the adapter, to prevent it from being GC'd.
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
7d585d4301
Ensure that gdb is installed on Travis CI (needed by attach-to-PID tests).
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
672c310905
Fix #1889 : Double "ptvsd_attach" for subprocesses
2019-11-12 18:13:25 -08:00
Pavel Minaev
173f9b3a48
Fix race condition in backchannel socket cleanup.
2019-11-12 18:13:25 -08:00
Fabio Zadrozny
4ce4e709ce
Prevent deadlock in expression evaluation.
2019-11-12 18:13:25 -08:00
Fabio Zadrozny
45738976bd
Make it possible to process commands in secondary threads before the debugger is ready to run.
2019-11-12 18:13:25 -08:00
Pavel Minaev
e1d5543819
Fix #1875 : Inject ptvsd into subprocesses
...
Fix #1901 : Race between IDE and server connecting to the adapter
Use "evaluate" request without "frameId" to import ptvsd into the debuggee as soon as server attaches.
If the adapter is spawned by the server, wait for server to connect if IDE connects first.
Fix test_subprocess to use the new test API, and add a check for ptvsd being loaded in the child process.
2019-11-12 18:13:25 -08:00
Fabio Zadrozny
b348e8dfe7
Add cython:True|False and frame_eval:True|False to pydevdSystemInfo. Fixes #1880 ( #1883 )
2019-11-06 12:35:53 -08:00
Pavel Minaev
0e8f1fa1b2
Fix #1888 : Concurrent imports cause error in force_pydevd
...
Iterate over a snapshot of sys.modules when checking loaded modules.
2019-10-31 12:30:23 -07:00
Pavel Minaev
9498dd2db7
Fix https://github.com/microsoft/ptvsd/issues/1877 :
...
"pydevdSystemInfo" does not report "ppid" on Python 2.7 on Windows
Fix the ctypes definition of PROCESSENTRY32 to have the correct size on 64-bit Python.
2019-10-31 12:15:43 -07:00
Pavel Minaev
db7b0b64a3
Disable multiproc tests that haven't yet been refactored to use the new debug.Session API.
2019-10-30 17:12:17 -07:00
Pavel Minaev
b862bb3143
Disable attach_by_socket("api") for test_flask due to #1886
2019-10-30 17:12:17 -07:00
Pavel Minaev
c910565b9a
Blacken code.
2019-10-30 17:12:17 -07:00
Pavel Minaev
fad3c4f878
Add "from __future__ import division" to all ptvsd modules.
2019-10-30 17:12:17 -07:00
Pavel Minaev
489dd4200d
Rename ptvsd.adapter submodules to avoid name clashes with variables.
2019-10-30 17:12:17 -07:00
Pavel Minaev
095e5bcd5c
Fix #1713 : Adapter: multiple concurrent sessions
2019-10-30 17:12:17 -07:00
Fabio Zadrozny
608803cb99
Subprocesses should inherit PydevdCustomization. Fixes #1874
2019-10-30 07:43:44 -03:00
Fabio Zadrozny
fe988d8149
Report ppid on pydevdSystemInfo on Python 2.7 on Windows. Fixes #1877
2019-10-30 07:43:33 -03:00
Fabio Zadrozny
88db1db271
Backport of https://github.com/fabioz/PyDev.Debugger/pull/151 to ptvsd
2019-10-28 08:54:00 -03:00
Fabio Zadrozny
e7727eb17a
Add new line to justMyCode message. Fixes #1844
2019-10-25 08:04:32 -03:00
Fabio Zadrozny
2e5b89deb0
Properly evaluate unicode strings on Python 2. Fixes #1864
2019-10-24 07:49:45 -03:00
Fabio Zadrozny
d01300a915
Use python 3.8 instead of python 3.8-dev in travis. Fixes #1856
2019-10-23 10:52:49 -03:00
Fabio Zadrozny
c22400bcf7
Make sure that ModuleEvent information is json-serializable. Fixes #1867
2019-10-23 10:52:41 -03:00