Commit graph

789 commits

Author SHA1 Message Date
Pavel Minaev
e96275703a
Testing framework for timeline-based tests. (#857)
* Testing framework for timeline-based tests.

See pytests/helpers/timeline.md for a detailed description.

Fixes #832, and lays the groundwork for #833.

* Upgrade pip to most recent version before installing prerequisites on Travis.
2018-10-01 14:29:44 -07:00
Fabio Zadrozny
23ea6e6989 Set frame.f_trace to None instead of just returning None to disable tracing. Fixes #837 (#855) 2018-09-27 14:22:56 -07:00
Karthik Nadig
173600754a
Add messages to error responses (#838)
* Add error messages for to error responses.

* Update tests

* Update some failure message text.

* update test_unknown_thread test
2018-09-27 11:06:58 -07:00
Pavel Minaev
b47df51478
Test & infrastructure cleanup, stage 1 (#850)
* Add new JSON IPC implementation to be shared between the product and the tests.

Add pytest-based test support, and wire it up to setup.py and Travis.

Dial pylint down to complain about important things only.

Various minor fixes exposed by pylint.

Add basic .vscode/settings.json for linter settings (and anything else that's workspace-specific).

Fixes #831.
2018-09-27 00:36:48 -07:00
Karthik Nadig
04cdf337ff
Check if exit code is none before converting to int (#843) 2018-09-26 00:31:20 -07:00
Karthik Nadig
eb478e3a24
Use SO_EXCLUSIVEADDRUSE on windows while creating socket (#844)
* Address reuse command line switch

* Revert "Address reuse command line switch"

This reverts commit cc72c74575a8af4849ac30dbe410be56619f10cb.

* Use SO_EXCLUSIVEADDRUSE on windows while creating socket
2018-09-26 00:30:18 -07:00
Fabio Zadrozny
62f03a2760 Use unhandled exception line when creating stack. Fixes #814 (#839) 2018-09-25 18:17:27 -07:00
Fabio Zadrozny
d03a2b044c Properly deal with handled/unhandled exceptions on top-level frames on a remote attach. Fixes #580, #581 (#827)
* Properly deal with handled/unhandled exceptions on top-level frames on a remote attach. Fixes #580, #581

* Remove leftover print.
2018-09-24 13:28:54 -07:00
Karthik Nadig
7b724f8d68
Preserve tab character while parsing XML (#829)
* Preserve tab character while parsing XML

* Add test for tab character

* Remove tab from safe list so that it is quoted.

* Revert "Preserve tab character while parsing XML"

This reverts commit 90816548122100320ba8507b3e780591b9ef744f.
2018-09-20 18:28:02 -07:00
ahaslam
c3217df886 Handled specific exception generated when detaching from the debug session in VS Code using the debug 'disconnect' button. Prevents the ptvsd from becoming unresponsive (#823) 2018-09-20 18:12:44 -07:00
Fabio Zadrozny
d3d334593b Fix raw_input on debugger redirect. Fixes #490 (#816)
* Fix raw_input on debugger redirect. Fixes #490

* Fix test.
2018-09-18 15:24:44 -07:00
Karthik Nadig
e1353d7981
for VS client only send single stopped event in multi-threaded case (#758)
* for VS client only send single stopped event in multi-threaded case

* Use preserveFocusHint only if the client is VS

* Addressing comments.

* Remove duplicate code.

* Address comments
2018-09-18 15:06:31 -07:00
Karthik Nadig
b1a64039ff
Glob does not pick up with correct casing if [] is removed. (#818) 2018-09-18 14:25:31 -07:00
Fabio Zadrozny
a8d4299fbf Bump pydevd version to 1.3.3. (#794) 2018-09-18 13:11:07 -07:00
Karthik Nadig
c60caca338
Updated Third party notice (#813) 2018-09-18 13:10:07 -07:00
Karthik Nadig
f8c3d847f8
Update readme with usage details (#807) 2018-09-18 13:09:36 -07:00
Karthik Nadig
80dec2a423
Fixes index error caused when debugging python files on network drives. (#808) 2018-09-17 14:04:29 -07:00
Karthik Nadig
c85995a9c3
Change arg to socket.listen from 0 to 1 (#806) 2018-09-17 10:51:30 -07:00
Pavel Minaev
a90f05c2d1 Fix #200: Local attach (#787)
Add --pid option to ptvsd command line. When used, injects the debugger
into the process with the specified ID, such that it connects back to
the specified host/port.
2018-09-14 17:01:44 -07:00
Fabio Zadrozny
66d75d8c87 Fixes issues dealing with path separators on path mappings. Fixes #762, #790 (#795) 2018-09-12 13:23:50 -07:00
Don Jayamanne
c36bf32ab5 Add ability to run without debugging (#797)
* Add ability to run without debugging

* Fix linter
2018-09-12 10:09:46 -07:00
Karthik Nadig
7d2d2efa56
Add test cases for wait on exit (#784) 2018-09-10 13:55:49 -07:00
Karthik Nadig
f10f95a2a3
Updating DAP schema (#785) 2018-09-06 14:10:49 -07:00
Fabio Zadrozny
5f18549e34 Fix issue in attach to process and improvement when dealing with coverage integration. (#781) 2018-09-05 11:22:24 -07:00
Karthik Nadig
09eb3397d7
Re-enable test_never_call_wait_for_attach test (#780) 2018-09-04 10:24:29 -07:00
Karthik Nadig
cd17a2af00
Enable more disconnect tests (#779) 2018-08-30 22:38:45 -07:00
Karthik Nadig
a7aac45468
Add preserveFocusHint to thread stopped event (#778)
* Add preserveFocusHint to thread stopped event

* Update tests

* Update more tests
2018-08-30 14:00:19 -07:00
Karthik Nadig
e54cf6be5a
Switch to using suspend-all/resume-all command (#775)
* Switch to using suspend all command

* Update tests
2018-08-30 10:46:20 -07:00
Fabio Zadrozny
6668ceec49 Provide a way to suspend and resume all threads. Fixes #732 (#771) 2018-08-29 14:19:57 -07:00
Karthik Nadig
df9c8fd9e0
Adds debug console completion (#772)
* Add support for debug console completion

* Add test files

* Adding tests

* Add supportsCompletionsRequest to _requests

* Add test for bad request

* Fix sorting issue in test

* Address comments

* Remove unsupported test for completions

* Add required argument to completions request in tests

* Fix linter issues
2018-08-28 18:33:28 -07:00
Pavel Minaev
f453ed1c41 Fix #355: Add 'remote launch' - launch a program for remote debugging but continue running the user code (#769)
* Fix #355: Add 'remote launch' - launch a program for remote debugging but continue running the user code

Add --wait command line argument, and don't block code execution if it is not specified.

* Add copyright headers.
2018-08-28 11:03:21 -07:00
Fabio Zadrozny
2e78687bea Create command to enable pydevd to send data using http-procotol instead of by line with urllib quoting. (#764)
* Create command to enable pydevd to send data using http-procotol instead of by line with urllib quoting.

* Added assertion.
2018-08-28 10:47:55 -07:00
Fabio Zadrozny
425291ed88 sys.__breakpointhook__ should be available when __builtin__.breakpoint is set. Fixes #766 (#767)
* sys.__breakpointhook__ should be available when __builtin__.breakpoint is set. Fixes #766

* On Python 3.7, sys.__breakpointhook__ should not be tested as it'll call the original pdb version.
2018-08-27 13:21:32 -07:00
Fabio Zadrozny
ea24922b71 Fix issue launching with --nodebug. Fixes #745 (#765) 2018-08-27 13:18:12 -07:00
Karthik Nadig
c68cd7be64
Show return values (#761)
* Add show return value feature

* Add show return value tests

* Fix linter

* Check presentation hints in tests
2018-08-27 12:58:45 -07:00
Karthik Nadig
634926b6a8
Change release type from alpha to production (#759) 2018-08-22 10:54:34 -07:00
Karthik Nadig
9cb2f97990
Improve web framework test reliability (#760)
* Try setting timeouts to stabalize tests

* Fix linter issues

* Fix break into debugger

* Soem tweaks

* Give web server additional time to finish writing to output

* refactor server url extraction code

* Fix 253 builtin breakpoint (#756)

* Refactored pydevd tests.

* Add support for Python 3.7 breakpoint() function. #253

* Add tests for continue on disconnect. (#744)

* Add tests for continue on disconnect.

* Wait for optput before sending commands

* Try setting timeouts to stabalize tests

* Fix linter issues

* Fix break into debugger

* Soem tweaks

* Give web server additional time to finish writing to output

* Address comments and enable more tests

* Set timeout in disconnect test

* Fix linter

* Ensure stopped thread is breakpoint thread
2018-08-22 10:15:17 -07:00
Karthik Nadig
c84e72b325
Add tests for continue on disconnect. (#744)
* Add tests for continue on disconnect.

* Wait for optput before sending commands
2018-08-20 11:52:04 -07:00
Fabio Zadrozny
731548ac4e Fix 253 builtin breakpoint (#756)
* Refactored pydevd tests.

* Add support for Python 3.7 breakpoint() function. #253
2018-08-20 10:57:46 -07:00
Karthik Nadig
917ac6b019
Fix for server attach break into debugger (#746)
* Fix server attach break into debugger issue

* More fixes and tweaks

* Added launch module test for break_into_debugger

* Tweak allowing break_into_debugger

* Add more tests

* Switch to using CMD_GET_EXCEPTION_DETAILS (#738)

* Switch to using CMD_GET_EXCEPTION_DETAILS

* Fix exception tests

* Fix breakpoint tests

* Fix ThreadSuspendEventTests

* Fix ExceptionInfoTests

* Fix linter issue

* Some tweaks

* Fix server attach break into debugger issue

* More fixes and tweaks

* Added launch module test for break_into_debugger

* Fix linter issues
2018-08-13 14:10:23 -07:00
Karthik Nadig
b706081f23
Switch to using CMD_GET_EXCEPTION_DETAILS (#738)
* Switch to using CMD_GET_EXCEPTION_DETAILS

* Fix exception tests

* Fix breakpoint tests

* Fix ThreadSuspendEventTests

* Fix ExceptionInfoTests

* Fix linter issue

* Some tweaks
2018-08-10 21:12:19 -07:00
Karthik Nadig
2e33062f56
break_into_debugger fixes and tests (#740)
* Support break_into_debugger for launch

* Add break_into_debugger tests

* Add re-attach tests

* Fix Linter
2018-08-10 11:28:06 -07:00
Fabio Zadrozny
14515d4613 Properly add __exception__ on all frames on caught exceptions (fixes #679) (#735)
* Properly add __exception__ on all frames on caught exceptions (fixes #679)

* Provide a CMD_GET_EXCEPTION_DETAILS.
2018-08-07 14:34:50 -07:00
Karthik Nadig
f698ad8696
Add file path to sys.argv when running as module (#655)
* Add file path to sys.argv when running as module

* Bunch of fixes to set the argv[0]  correctly.

* check for pyc

* tweak __main__ py or pyc selection for argv
2018-08-07 14:08:05 -07:00
Karthik Nadig
ed565b2d05
Turning suspend all policy and using get stack trace command (#731)
* Continue resumes all threads

* Enable suspend policy ALL

* stacktraces and active exceptions are no longer stored

* stacktraces and active exceptions are no longer stored

* Fix set breakpoints tests

* Fix exception info

* Fix breakpoint tests

* Fix exception breakpoint tests

* Fix syntax

* Fix exception info

* Fix syntax

* Fix Stack trace tests

* Fix for 2.7

* Minor refactor

* Fix ContinueTests

* Fix ExceptionInfoTests

* Enable more tests

* Remove tests that are now no-ops

* Minor tweaks

* Fix test_attach_breakpoints

* typo

* More tweaks

* Send error response for unknown threads

* Use assert_contains in continue tests

* Add some TODOs
2018-08-07 11:40:33 -07:00
Karthik Nadig
bd1d1aa6b8
Uncomment some test code. (#736) 2018-08-07 10:46:06 -07:00
Karthik Nadig
e6865adac5
Remove redirect output timeout (#734) 2018-08-06 10:42:01 -07:00
Karthik Nadig
dbf3d60499
Fix for test_setup failure in python 3.7 (#733)
* Logging to find VSTS issue with test_setup

* Fix for test_setup issue

* Remove unused import
2018-08-05 11:04:59 -07:00
Fabio Zadrozny
0a773785f0 Stop showing message. #719 (#729) 2018-08-02 13:30:13 -07:00
Karthik Nadig
53e421a101
Clean up template breakpoints on detach (#713) 2018-08-02 12:43:57 -07:00