Commit graph

875 commits

Author SHA1 Message Date
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
Karthik Nadig
e01ceb2516
pytests for django and flask (#930)
* Web frameworks tests initial

* add more no-multiproc tests

* Added multiproc flask test

* Fix linter

* non-multiproc exception tests

* Minor fixes

* more fixes.

* Improve link detection.

* Addressing comments and tweaks

* More fixes and cleanup

* Added django multiproc test with some cleanup

* Skip django multi proc for now

* fix linting

* Disable django tests for 2.7 due to unrelated gun in deugger

* More cleanup and stability

* Skip django multiproc

* Turn off flask test for py2.7 linux/mac
2018-10-18 09:44:40 -07:00
Pavel Minaev
5197e1e73f
Update README.md
More improvements.
2018-10-17 19:46:39 -07:00
Pavel Minaev
a4c0c32892
Update README.md
Fix snippets since `--host` is now required, and clarify things in general.

Fix JSON highlighting.
2018-10-17 19:31:35 -07:00
Pavel Minaev
bd220d0333 Fix #925: Make --host a required switch 2018-10-17 13:29:09 -07:00
Karthik Nadig
85b532a7cd
Update issue templates (#917)
* Update issue templates

* Remove old issue template
2018-10-15 11:16:37 -07:00
Pavel Minaev
465f79d5e1 Fix wait_until not handling multiple new occurrences correctly. 2018-10-14 21:15:35 -07:00
Pavel Minaev
a43bb4f255 Add more test diagnostic output for expectation testing. 2018-10-14 21:15:35 -07:00
Pavel Minaev
07f45e2922 Add test diagnostic output for failure to realize expectations that are being waited on. 2018-10-14 21:15:35 -07:00
Pavel Minaev
1ad740d89e Fix timeline wait_for and wait_for_next. 2018-10-14 21:15:35 -07:00
Pavel Minaev
90f8bac273 Fix linting issue. 2018-10-14 21:15:35 -07:00
Pavel Minaev
e32a90d601 Remove comment that is no longer applicable. 2018-10-14 21:15:35 -07:00
Pavel Minaev
50a250f1fc Refactor messaging to consistently use Request/Response/Event objects to represent both incoming and outgoing messages.
Fix messaging issues uncovered by test_fuzz, and fix the test itself.
2018-10-14 21:15:35 -07:00
Pavel Minaev
5065397489 Remove test checking that CMD_PROCESS_CREATED is unsupported. 2018-10-14 21:15:35 -07:00
Pavel Minaev
d8502f9d6f Increase timeout for test_messaging. 2018-10-14 21:15:35 -07:00
Pavel Minaev
5e593af2de Fix tests to accommodate port=0 being legal now. 2018-10-14 21:15:35 -07:00
Pavel Minaev
24851e5f5b Test fixes. 2018-10-14 21:15:35 -07:00
Pavel Minaev
87a3f591ff Fix #887: subprocess: command line rewriting
Add the necessary command line switches for rewriting.

Re-implement subprocess notification to properly handle detached debugger.
2018-10-14 21:15:35 -07:00
Pavel Minaev
d0ac8d6816 When channel is closed with pending requests, mark them all as failed.
Message channel refactoring to simply  request handling.
2018-10-14 21:15:35 -07:00
Pavel Minaev
bad34258ac Detour pydev_monkey.patch_args and construct the appropriate ptvsd command line. 2018-10-14 21:15:35 -07:00
Pavel Minaev
317e7b0657 Add missing handler for CMD_PROCESS_CREATED. 2018-10-14 21:15:35 -07:00