Pavel Minaev
562afbcde0
Fix #414 : test_invalid_breakpoints fails on Python 3.9
...
Adjust expected line numbers in test to reflect Python changes.
2020-09-21 12:24:47 -07:00
Pavel Minaev
14ca4f07d1
Fix #351 : Python warnings in debugger code
...
Don't use inspect.getargspec on Python 2.
Close log file objects on exit.
Close os.devnull file objects on exit.
Close the listener socket used to get endpoints info from adapter.
Fix invalid escape sequences.
Run tests with Python warnings treated as errors.
Fix Django deprecation warning in test web app.
Work around pytest issues caused spaces in test names.
2020-09-03 01:32:58 -07:00
Pavel Minaev
677fef79d1
Disable frame-eval by default to work around #346 .
2020-08-26 10:09:19 -07:00
Pavel Minaev
17ff9c8df9
Restrict pytest-xdist version number to support Python 2.7.
2020-08-19 14:50:44 -07:00
Pavel Minaev
5087603ea3
Fix #370 : Terminal Keyboard Inputs not being accepted
...
Make the debuggee process group the foreground group in its session.
Add a test for input(), and improve existing stdin test to cover more cases.
2020-08-19 14:50:44 -07:00
Pavel Minaev
57ec4c4f65
Fix #125 : Stop Debugging in a "noDebug" session doesn't kill subprocesses
...
On Windows, run the debuggee in a separate Win32 job, and terminate the job when launcher exits.
On POSIX, run the debuggee in a separate process group (PGID), and kill the entire group when launcher exits.
Improve process tree autokill tests to actually check whether the child process has exited.
2020-08-11 09:41:51 -07:00
Pavel Minaev
2c524faacd
Fix #305 : Add "pythonArgs" config property for interpreter arguments
...
Expose "pythonArgs" to clients.
Make "python" usable in tests in lieu of "pythonPath", and make the runners use it.
Add tests for all combinations of "python"/"pythonPath" and "pythonArgs".
2020-08-03 11:45:55 -07:00
Fabio Zadrozny
499bbb2a1e
Don't patch stdin on debugpy. Fixes #296
2020-07-23 08:28:14 -03:00
Fabio Zadrozny
1bef8e5ffb
Improve dealing with blocking evaluate requests. Fixes #157
2020-07-18 14:57:02 -03:00
Pavel Minaev
93982f9ad4
Reformat everything with a newer version of Black.
2020-06-26 13:37:31 -07:00
Pavel Minaev
9ba20c40af
Disable test_attach_pid_client on Windows and macOS per #311
2020-06-24 08:56:18 -07:00
Karthik Nadig
984bf59ce0
Update to use latest flask in tests
2020-06-12 13:14:51 -07:00
Fabio Zadrozny
cc1d3f69d1
Fix flake8 issue.
2020-05-13 15:18:36 -03:00
Pavel Minaev
73665b9af9
Parse and apply "python" / "pythonPath" in the adapter rather than in the launcher.
...
Fix errors with missing "args".
Add test for "pythonPath".
2020-05-08 17:10:34 -07:00
Pavel Minaev
1a44e70206
Fix #156 : Add a flag for the old way of handling args from a launch config
...
Add new property "argsExpansion", which defaults to "shell", but can be explicitly set to "none" to request no expansion.
Propagate "args" to launcher via CLI or JSON, depending on the value of "argsExpansion".
Move the logic to compute process name back to the adapter, alongside other processing of "launch" targets.
2020-05-07 12:31:40 -07:00
Pavel Minaev
50bf46cf9d
Add test for "args" shell expansion.
2020-04-22 13:55:01 -07:00
Fabio Zadrozny
011810aa42
Change __len__ to len().
2020-04-21 08:20:54 -03:00
Fabio Zadrozny
d2014babd6
Show globals, group variables and show all dir() variables.
...
Fixes https://github.com/microsoft/ptvsd/issues/118
Fixes https://github.com/microsoft/ptvsd/issues/763
Fixes https://github.com/microsoft/ptvsd/issues/1621
2020-04-21 08:20:54 -03:00
Pavel Minaev
47dd3da5e7
Fix #99 : multiprocessing triggers preLaunchTask and postDebugTask more than once
...
Remove "preLaunchTask" and "postDebugTask" from derived debug configurations generated for subprocesses.
2020-04-03 15:46:09 -07:00
Pavel Minaev
32c00bc85c
Fix #92 : Debugging as sudo fails to terminate the debugger when you stop
...
Apply sudo to debugpy.launcher, rather than the debuggee itself.
2020-04-01 21:16:20 -07:00
Pavel Minaev
2d35573eda
Fix #90 : "subProcess" is not respected
...
Propagate "subProcess" to the debug server via command line in launch scenarios.
Fix debugpy.configure() being a no-op rather than a shim for api.configure().
2020-04-01 20:10:34 -07:00
Fabio Zadrozny
6be9c6df33
Keep order of items in dictionary (Py3.6 onwards) or odict. Fixes https://github.com/microsoft/ptvsd/issues/998
2020-04-01 15:51:44 -03:00
Pavel Minaev
69db68a5f9
Fix https://github.com/microsoft/ptvsd/issues/2108 :
...
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.
2020-03-18 14:22:10 -07:00
Pavel Minaev
161af6f5f6
Remove unused imports.
2020-03-13 17:26:08 -07:00
Pavel Minaev
dd02acbe52
Remove broken test_wait_on_exit ( #73 ).
2020-03-13 17:26:08 -07:00
Pavel Minaev
dccb5e6198
Use "connect":{...} and "listen":{...} to indicate direction of connection in debug configuration.
2020-03-05 13:56:22 -08:00
Pavel Minaev
2d013e58ec
Swap attach_listen / attach_connect to reflect the client perspective.
2020-03-05 13:56:22 -08:00
Pavel Minaev
73a4c8b712
Actually run full test matrix for DEBUGBY_TESTS_FULL=1.
...
Fix full run test failures.
2020-03-05 13:56:22 -08:00
Pavel Minaev
6ad1382a8c
Fix https://github.com/microsoft/ptvsd/issues/1824 :
...
Allow ptvsd to run as server and let code connect to it
Expose --connect and debugpy.connect() as a public API, and add tests for it.
2020-03-05 13:56:22 -08:00
Pavel Minaev
4f43e00a07
Remove suppport for arrays in "program" and "module" debug configuration properties as alternative to "args".
...
Change the meaning of array for "code" debug configuration property to represent multiple lines of code.
Switch tests to use "args".
2020-02-21 15:55:17 -08:00
Pavel Minaev
de9ea2cb9c
Improve exception logging to make swallowing/reraising explicit in all cases.
2020-02-21 15:55:04 -08:00
Pavel Minaev
bf1fbbc8ee
Fix #53 : "logToFile" doesn't create pydevd logs
...
Set PYDEVD_DEBUG and PYDEVD_DEBUG_FILE based on DEBUGPY_LOG_DIR.
2020-02-20 16:09:35 -08:00
Pavel Minaev
6feb7f9fe1
Fix https://github.com/microsoft/ptvsd/issues/2079 :
...
sys.argv sends in unicode instead of string
Convert sys.argv to Unicode as it is being parsed, and do not touch the remaining args.
2020-02-17 18:21:13 -08:00
Pavel Minaev
1cbd5891b7
Fix https://github.com/microsoft/ptvsd/issues/2081 : KeyError: 'PTVSD_LAUNCHER_PORT' happened when debug with "sudo"
...
Remove redundant use of sudo to spawn the launcher.
Add test for "sudo".
2020-02-13 01:22:10 -08:00
Pavel Minaev
8c114ed589
Purge all mentions of "IDE", and replace with "client" or "clients" as appropriate.
...
Blacken code.
2020-02-11 17:03:45 -08:00
Pavel Minaev
8447a15396
Refactor debugpy API and CLI for clarity and consistency.
2020-02-11 14:40:25 -08:00
Fabio Zadrozny
5d5f8f42ec
Re-attach to pid when using --client. Fixes https://github.com/microsoft/ptvsd/issues/1817
2020-02-06 08:31:28 -03:00
Pavel Minaev
4e2abc6681
Tests and CI refactoring:
...
Use YAML templates for setting up Python and running tests.
Use matrix instead of separate jobs for Windows 32-bit and 64-bit runs.
Change --debugpy-logs to --debugpy-log-dir with explicit destination, and use that to capture and publish test logs in CI.
Delete logs for passed tests by default, and add --debugpy-log-passed to opt out.
2020-01-30 20:43:17 -08:00
Pavel Minaev
7a2891b950
Merge pull request #13 from int19h/tele
...
Send both "ptvsd" and "debugpy" telemetry events for smooth transition.
2020-01-29 15:04:03 -08:00
Pavel Minaev
367ff72788
Send both "ptvsd" and "debugpy" telemetry events for smooth transition.
2020-01-29 14:32:28 -08:00
Fabio Zadrozny
c53bd3345a
Properly use socket module private copy for gevent support. Fixes #1641 ( #6 )
2020-01-29 16:18:24 -03:00
Pavel Minaev
65a4bed845
Fix https://github.com/microsoft/ptvsd/issues/2052 :
...
An error display in output window when debug with "Windows Application" option checked.
Do not propagate debuggee's stdout and stderr to sys.stdout/stderr if the latter are missing.
2020-01-28 17:08:13 -08:00
Pavel Minaev
3ce4e703ee
Fix linting issues.
2020-01-28 14:43:20 -08:00
Pavel Minaev
0fb24534b6
Fix #2055 : Conda activation problem on ptvsd 5.x
...
Treat variable names as case-insensitive on Win32.
2020-01-28 10:15:13 -08: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
1e3fe90339
Re-enable test_wait_on_exit on Python 2.7
2020-01-22 15:52:52 -08:00
Pavel Minaev
6915757eb5
Fix #3 : Child processes aren't auto-killed reliably
...
Kill all known debuggee processes in the adapter when a "launch" session is finalized.
2020-01-22 14:58:10 -08:00
Pavel Minaev
784f7bc271
Merge pull request #1 from int19h/1776
...
Fix https://github.com/microsoft/ptvsd/issues/1776
2020-01-21 22:24:39 -08:00
Pavel Minaev
ddef96655f
Disable test_autokill due to https://github.com/microsoft/debugpy/issues/3
2020-01-21 21:43:19 -08:00
Pavel Minaev
c530c29281
Fix test_echo_and_shell
2020-01-21 17:49:02 -08:00