Commit graph

1512 commits

Author SHA1 Message Date
Pavel Minaev
0dd33dd250 Fix #108: Debugger freezes in VSCode
When talking DAP over stdio, disable stderr before logging anything to it.
2020-04-08 13:51:29 -07:00
Karthik Nadig
2ff3c11ce9
Merge pull request #104 from microsoft/update-nuget-pkgs
Update nuget config to latest python versions.
2020-04-03 23:02:26 -07:00
Karthik Nadig
47c9239864
Update nuget config to latest python versions. 2020-04-03 19:32:41 -07: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
Karthik Nadig
cd803cc14b
Merge pull request #96 from fabioz/ptvsd_998_dict_order
Keep order of items in dictionary (Py3.6 onwards) or odict.
2020-04-01 18:32:27 -07:00
Karthik Nadig
e8a830e14a
Merge pull request #95 from fabioz/sync_with_pydevd
Synchronizing with contributed changes to pydevd.
2020-04-01 18:28:47 -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
Fabio Zadrozny
7d5c55fa2e Synchronizing with contributed changes to pydevd. 2020-04-01 10:25:54 -03:00
Pavel Minaev
f263309598 Fix #84: Debugging: ConnectionRefusedError with debugpy
Always use backlog of at least 1 for listener sockets.

Improve launcher-related error messages in adapter.
2020-03-31 22:21:39 -07:00
Fabio Zadrozny
8fc238e296 Show bytecode when source code cannot be fetched.
Fixes https://github.com/microsoft/ptvsd/issues/1304
2020-03-29 07:55:20 -03:00
Pavel Minaev
eb76fbb2e3 Handle "cp65001" pseudo-encoding correctly on Python 2.7. 2020-03-25 21:06:46 -07:00
Pavel Minaev
2541b909c2 Fix #87: Debugger doesn't start if LANG is set to non-existent locale
Ignore errors from setlocale("") instead of failing immediately.
2020-03-25 21:06:46 -07:00
Pavel Minaev
b0daf0f0cf Fix #83: Hang with "redirectOutput":true and too much output
Set sys.stdin/out/err to os.devnull if using stdio to talk to the client, instead of redirecting stdout to stderr.
2020-03-25 21:06:46 -07:00
Fabio Zadrozny
ed8fe167d0 Preliminary support for Python 3.9. Fixes #35 2020-03-25 08:51:48 -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
Fabio Zadrozny
c12cb6b7dc Don't import asyncio early to avoid importing multiprocessing. Fixes https://github.com/microsoft/ptvsd/issues/2108 2020-03-18 13:12:24 -07:00
Fabio Zadrozny
c08b73f793 Don't try to resolve files with sys.path. Fixes #52 2020-03-18 14:16:19 -03: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
ac98e8a623 Fix #69: "Couldn't spawn debuggee" with non-ASCII filename on Python 2.7
Prevent implicit filename conversion from bytes to unicode with incorrect encoding.
2020-03-13 17:26:08 -07:00
Pavel Minaev
ec50794286 Fix logging of non-Unicode cwd, command line, and environment variables when spawning debuggee. 2020-03-13 17:26:08 -07:00
Pavel Minaev
754204b0d2 Fix incorrect propagation of errors. 2020-03-13 17:26:08 -07:00
Pavel Minaev
d12f1d27ef Fix #72: "Wait on exit" blocks indefinitely when there's no terminal
Block use of "waitOnNormalExit" and "waitOnAbnormalExit" with "console":"internalConsole".

Do not wait on exit if stdin is not interactive (e.g. when running under pythonw.exe).
2020-03-13 17:26:08 -07:00
Pavel Minaev
a0ca896b26 Update and clean up test configs in launch.json 2020-03-13 17:26:08 -07:00
Fabio Zadrozny
935c118a1c Fix inconsistencies in handling files. Fixes https://github.com/microsoft/ptvsd/issues/1636 2020-03-10 12:37:39 -07:00
Fabio Zadrozny
30931d560e Remove JUST_MY_CODE support from debugOptions. Fixes #64 2020-03-09 08:54:21 -03:00
Fabio Zadrozny
6b335f19e6 Change references from debugStdLib to justMyCode. Fixes https://github.com/microsoft/ptvsd/issues/1469 2020-03-07 08:10:28 -03:00
Fabio Zadrozny
198cc5761e Skip functions considering lines instead of function name. Fixes #51 2020-03-07 08:05:19 -03:00
Pavel Minaev
b6de4aced8 Increase timeout for CI code coverage on Windows. 2020-03-06 17:20:36 -08:00
Pavel Minaev
c14de79bb2 Fix #60: CI: macOS agent image deprecated
Update all VM images to newer versions.
2020-03-06 17:20:36 -08: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
Fabio Zadrozny
ecf0446d3f Allow speedups to be imported. 2020-02-20 09:35:06 -03:00
Fabio Zadrozny
64bb304a69 Dedent block sent for evaluation. Fixes https://github.com/microsoft/ptvsd/issues/1570 2020-02-20 09:34:28 -03:00
Pavel Minaev
0ce5eff60c Fix https://github.com/microsoft/ptvsd/issues/2082:
Failure to spawn ptvsd.launcher is not propagated to the client

Propagate errors from listener sockets, Popen(), and "runInTerminal" request back to the client.
2020-02-19 15:42:08 -08:00
Pavel Minaev
371fe76772 Fix CLI help. 2020-02-18 16:01:39 -08:00
Fabio Zadrozny
ccd9ac5f24 Use launcher pid as ppid in DAP. Fixes #42 2020-02-18 14:55:33 -03:00
Pavel Minaev
7454f89d25
Fix sporadic EBADF from accept() 2020-02-17 20:48:25 -08:00
Pavel Minaev
fb9590fab0
Merge pull request #46 from int19h/2079
Fix https://github.com/microsoft/ptvsd/issues/2079: sys.argv sends in unicode instead of string
2020-02-17 20:40:34 -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
9fe1be6eec
Merge pull request #44 from int19h/fix_2081
Fix https://github.com/microsoft/ptvsd/issues/2081
2020-02-13 11:03:55 -08:00
Fabio Zadrozny
189c3265c1 Deal with exceptions in hasattr/dir/isinstance. Fixes https://github.com/microsoft/ptvsd/issues/2076 2020-02-13 08:54:10 -03: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