Commit graph

1945 commits

Author SHA1 Message Date
Pavel Minaev
e208fb1d68 Workaround for #1028 2018-11-16 23:48:39 -08:00
Pavel Minaev
835e1f5490 Fix #1025: timeline: sequencing doesn't apply to all operands of a compound expectation
Fix #1026: timeline: compound expectations don't backtrack
2018-11-16 23:48:39 -08:00
Karthik Nadig
cc5d57a192
Migrate to pytests from tests\ptvsd (#1024)
* Migrate parse args tests

* Remove old parse args tests

* Run only pytests

* Migrate internals filter tests

* Remove old internal filter tests

* Migrate pathutils tests

* Remove old pathutils tests

* Revert "Run only pytests"

This reverts commit eaed6de3c64e102a540b751b06d774dab0930427.

* Remove old _local.py tests
2018-11-16 13:59:25 -08:00
Karthik Nadig
bd03d3a523
Merge into master (#1020)
* Migrate debugger tests (#968)

* Remove references to old test code (#1019)
2018-11-14 16:40:00 -08:00
Pavel Minaev
12a2386739
Merge pull request #1014 from int19h/987
Test fixes and tweaks
2018-11-14 12:32:37 -08:00
Pavel Minaev
3cd0807390 Test fixes and tweaks.
wait_for_response should raise if response was an error.
2018-11-14 06:10:25 -08:00
Karthik Nadig
96255d8a0a
Empty stack traces. Fixes #1006 (#1011) 2018-11-13 12:47:56 -08:00
Fabio Zadrozny
50a2ac528d Fix issue launching module with -m. #991 (#995)
* Fix issue launching module with -m. #991

* Add launching test for Python 2.

* Fix for test in Python 2.6
2018-11-13 10:33:50 -08:00
Karthik Nadig
36f2aef119
Add start method import (#1004)
* Add unicode tests

* Fix breakpoint for unicode test

* Add ptvsd import test

* Improve how we do import ptvsd tests.

* Enable import ptvsd tests

* Disabling import based test temporaily
2018-11-12 18:35:35 -08:00
Archit
8b92b8462d Correct Grammatical Mistakes (#976) 2018-11-12 14:46:08 -08:00
Pavel Minaev
264c831aad Fix race conditions in timeline tests due to daemon threads still running after the test completes. (#1002) 2018-11-09 17:39:06 -08:00
Karthik Nadig
ad4f8adcea
Decouple debug session and start method (#999)
* Decouple debug session and start method

* Rename starttype to start_method

* Refactor common setup and prepare to run

* Fix linter

* Use kwargs in Initialize
2018-11-09 15:06:37 -08:00
Pavel Minaev
a45272b66a
Merge pull request #994 from int19h/503
Fix #503: Subprocesses are not killed when stopping the debugger
2018-11-08 17:31:35 -08:00
Pavel Minaev
73dafb2730 Remove test_live_pydevd - these are unstable, and the same functionality is now covered by pytests. 2018-11-08 17:06:13 -08:00
Pavel Minaev
9bedbedd4e Switch test_autokill back to subprocess.Popen - os.spawn uses fork internally, even on Python 3. 2018-11-08 15:01:25 -08:00
Karthik Nadig
f3cfd0fb8a
Stacktrace contains xml escaped characters. Fix #948, #981 (#996)
* Fix 948. Stacktrace contains xml escaped characters.

* Test for paht containing ampersand
2018-11-08 14:45:14 -08:00
Pavel Minaev
c9c6417788 Fix out-of-order printing. 2018-11-08 14:05:10 -08:00
Pavel Minaev
6e965692a0 Change test_autokill to use os.spawn, to allow it to run on all platforms. 2018-11-08 13:25:26 -08:00
Pavel Minaev
902c223b8f Do not check for specific exit code for forcibly terminated processes.
Fix linter errors.
2018-11-07 22:12:49 -08:00
Pavel Minaev
e1d06cf592 Invoke pytest directly from Travis makefile, instead of going via setup.py.
Increase test verbosity on Travis.
2018-11-07 21:50:47 -08:00
Pavel Minaev
c0f1bf9ca8 Fix #503: Subprocesses are not killed when stopping the debugger 2018-11-07 21:15:51 -08:00
Pavel Minaev
cc05d7058d Fix test. 2018-11-07 20:24:56 -08:00
Pavel Minaev
0ccc4697a4 Add disconnect handler support to JsonMessageChannel.
Only wrap RequestFailure exceptions as fail responses when handling a request, to avoid inadvertently wrapping and swallowing logic errors.
2018-11-07 19:53:17 -08:00
Pavel Minaev
ce9233a9af Dial down timeline test output verbosity. 2018-11-07 10:27:43 -08:00
Pavel Minaev
a713d873ff Disable output coloring - Azure Pipelines doesn't support it yet. 2018-11-07 10:22:25 -08:00
Pavel Minaev
32169977bc
Merge pull request #985 from int19h/984
Fix #984: Remote debugging not working with multiproc
2018-11-02 15:06:43 -07:00
Pavel Minaev
ef547d4c9c Relax checks for "terminated" and "exited" events on Python 2. 2018-11-02 13:47:48 -07:00
Pavel Minaev
af2f86eed5 Fix #984: Remote debugging not working with multiproc
Use parent's --host when spawning child processes.
2018-11-02 12:36:21 -07:00
Karthik Nadig
1139b400c8
Integrate single suspend event change to master (#974)
* Provide a single notification when a breakpoint is hit. #805 (#922)

* Provide a single notification when a breakpoint is hit. #805

ptvsd requires all threads to be stopped or all threads to be running
(this is a limitation for vsts), so, we generate a single notification
when a breakpoint is hit and have CMD_GET_THREAD_STACK wait to get the
actual stack (or if the thread is not paused in a timely manner,
provide the stack as it is, but in this case it may not be possible
to get the locals or interact with the frame -- issued commands
will timeout).

* Rename CMD_SUSPEND_ON_BREAKPOINT_EXCEPTION to CMD_PYDEVD_JSON_CONFIG.

* Fixes to ptvsd tests related to differences of thread events after changes to PyDBCommandThread.

* Make ptvsd use CMD_THREAD_SUSPEND_SINGLE_NOTIFICATION and CMD_THREAD_RESUME_SINGLE_NOTIFICATION.

* Fixing tests.

* Sleep on wait_for_attach() (should be removed later) -- it seems there's still a racing condition as wait_for_attach() seems to proceed before CMD_PYDEVD_JSON_CONFIG is passed on to pydevd.

* Test changes needed to integrate 805 (#969)

* Integrate 805 initial

* Fix send suspend event to use single suspend event command

* Fix thread run event tests.

* Fix event ordering

* fix reattach tests

* Increase timeouts for some tests.

* Fix more tests

* fix typo

* Skip flaky/redundent re-attach tests

* more cleanup

* Replace completions tests with pytests

* Ensure continued is sent when the thread runs.

* Dont wait for continued in completions tests.

* Revert "Ensure continued is sent when the thread runs."

This reverts commit caef558fcf4d890d01bf3e5694b3dbc42795aaaf.

* Skip broken tests.

* Parametrize completion tests
2018-11-01 15:12:21 -07:00
Fabio Zadrozny
1b64a375f2 Handle case where no completions are provided by the debugger. Fixes #978 (#979) 2018-11-01 11:26:55 -07:00
Pavel Minaev
79ec02be43
Merge pull request #977 from int19h/967
Fix #967: Debugging Django in VSC with subprocess debugging is very slow
2018-10-31 20:14:32 -07:00
Pavel Minaev
1a13aa2450 Fix #967: Debugging Django in VSC with subprocess debugging is very slow
Avoid hogging CPU while waiting on the subprocess notification queue.
2018-10-31 19:44:46 -07:00
Moulik Aggarwal
0a0c66ca9e Automate pytest using tox (#934)
* Automate pytest using tox

* requirements.txt file updated

* Changed test_requirements.txt and tox.ini

* Added python 3.4 in tox file
2018-10-30 18:00:13 -07:00
Pavel Minaev
f63825fa15
Merge pull request #972 from int19h/966
Fix #966: Sub process debugging not working with PTVSD
2018-10-30 17:58:34 -07:00
Pavel Minaev
90ed6fe31f Use backchannel instead of text output in test_subprocess to improve test reliability. 2018-10-30 17:33:47 -07:00
Pavel Minaev
a23165faf9 Fix #966: Sub process debugging not working with PTVSD
Allow launching ptvsd as script rather than as a module.

Use script mode in multiproc implementation, and in tests, to avoid explicit PYTHONPATH manipulation.
2018-10-30 15:08:49 -07:00
Karthik Nadig
ca27f00f85
Revert "Fix #941: Custom event with process information (#942)" (#963)
This reverts commit a2832aeae8.
2018-10-29 11:24:11 -07:00
Karthik Nadig
9920fceb05
Fix couple of osx issues (#961)
* Fix couple of osx issues

* Fix comment typo
2018-10-26 17:10:15 -07:00
Karthik Nadig
5b65c8b954
Migrate modules manager, safe repr, and socket tests (#955)
Fixes #958 #957 #956
* Migrate modules manager and socket tests
* Migrate safe repr
2018-10-25 13:32:13 -07:00
Karthik Nadig
5f777818aa
Tests for break on start, wait for normal and abnormal exit (#952)
* Add variables and evaluate tests

* Add sort order and evaluate tests

* Ensure the last output is seen

* Add stop on entry tests, normal and abnormal exit tests

* Fix tests for 2.7

* Fix minor linting issue
2018-10-24 12:37:51 -07:00
Karthik Nadig
54004c0fc0
Add 'Multiprocess' debug option (#950)
* Add Multiprocess debug option

* Update tests to use the Multiprocess debug option

* Fix linter

* Fix typo

* Correctly pathc the new process functions

* Fix linter
2018-10-23 13:08:45 -07:00
Pavel Minaev
a2832aeae8 Fix #941: Custom event with process information (#942)
* Fix #941: Custom event with process information

* Fix tests to accommodate the new ptvsd_process event.

* More test fixes for 'ptvsd_process'.

* Fix tests

* Fix more tests
2018-10-22 20:48:58 -07:00
Karthik Nadig
1844dfb8fd
Set SIO_LOOPBACK_FAST_PATH while creating socket in windows (#913)
* Set SIO_LOOPBACK_FAST_PATH while creating socket in windows

* Switch to attribute error

* Fix issue with leaving port open if there are binding or listening errors in create_socket
2018-10-22 18:15:25 -07:00
Pablo Aguiar
182683b288 Fix a broken link and a double space in README.md (#946) 2018-10-22 11:29:17 -07:00
Pavel Minaev
26cfd18f99
Merge pull request #939 from int19h/896-master
Merge changes from v4.1.4-branch into master.
2018-10-19 15:00:37 -07:00
Karthik Nadig
c5aa2a05d1
Updating test related info (#936)
* Updating test related info

* address comments
2018-10-19 13:31:16 -07:00
Pavel Minaev
2dd5f0ff0b Fix multiproc debugging to use the new CLI syntax. 2018-10-18 16:30:52 -07:00
Pavel Minaev
1c6c71d4b9 Fix DebugSession to match the new CLI syntax. 2018-10-18 16:10:29 -07:00
Pavel Minaev
c7ee9277f3 Fix #896: Changes in CLI arguments between versions
Merge changes from v4.1.4-branch into master.
2018-10-18 15:02:34 -07:00
Karthik Nadig
d3ed016094
Add subprocess library test (#937) 2018-10-18 15:00:53 -07:00