Commit graph

776 commits

Author SHA1 Message Date
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
Fabio Zadrozny
46eef12aa9 Provide stack trace of uncaught exception on CMD_GET_THREAD_STACK (#697). (#710) 2018-08-01 22:01:56 -07:00
Karthik Nadig
522e9f1ce4
Fixes some bugs with just-my-code (#727)
* Continue if the suspended in debugger code

* Get more info via exception description

* More logging

* Add a check for site-packages

* Remove debug logs and cleanup

* Fix tests

* Fix more test bugs

* more cleanup
2018-08-01 19:40:34 -07:00
Don Jayamanne
f726968304
Fix blocking enable_attach and breaking on the main thread in remote debugging (#706)
Fixes #545, #711, #712 
More tests to be written as part of #718 

Summary of solution:
* For remote attach, spin up pydevd (use `install`) 
* In a separate thread wait for connections (within a loop, to support multiples)
* Ensure only one connection is supported at a time
* Use a simple event to ensure we have a single session at a time (we won't accept more than one connection if even is set)
* Use a simple event to detect when a handshake has been successfully been done

![image](https://vignette.wikia.nocookie.net/steven-universe/images/3/35/86036-victory-dance-gif-Despicable-M-EPnS.gif/revision/latest?cb=20150727031515)

@karthiknadig 
I've basically reverted the way `enable_attach` works.
This allows breaking into the current thread without any issues.
Not sure what else it breaks, lets see how the tests go.

Lets talk about the changes, hacks/solutions tomorrow.
Easy fixes, just need some simple locks!!
2018-08-01 13:00:14 -07:00
Karthik Nadig
4a4e76e6d9
Enable stop on entry feature (#702) 2018-07-31 14:52:18 -07:00
Don Jayamanne
1ec66105e1 Remove unwanted parameter and re-assigning of it (#709) 2018-07-31 12:58:24 -07:00
Karthik Nadig
c495e3749e
Fix issue with attach to remote machine (#703) 2018-07-30 15:25:13 -07:00
Fabio Zadrozny
f712369515 Provide a CMD_STOP_ON_START (#231), fix issues on path separator, refactor wait_for_breakpoint in tests. (#700) 2018-07-30 13:09:05 -07:00
Fabio Zadrozny
e5027cb5a5 Added Python 3.7 support and fixed issues related to Jython on Travis. (#692) 2018-07-28 10:25:57 -07:00
Karthik Nadig
75e53eed24
Django and Flask system test (#689)
Fixes #675 #674
* Flask system tests initial

* Enable route and template breakpoint tests.

* Fix typo

* Remove wait for thread exit

* Few more tweaks

* More tweaks

* Try adding LC_ALL utf-8

* Add more tests

* Remove flask version pinning

* Rename and move flask tests to make room for django tests

* Switch to using requests

* Fix line number in attach

* Add django to packages

* Add Django tests

* Tweaks to django test

* Remove hardcoded port
2018-07-26 15:13:59 -07:00
Fabio Zadrozny
d997742419 Fix 72 break suspension policy (#673)
* #72: Provide a way to set breakpoint suspension policy.

* Provide a CMD_GET_THREAD_STACK (#72).
2018-07-23 15:20:13 -07:00
Karthik Nadig
5db5b30ea8
Add unhandled exception tests (#682)
Adds unhandled exception tests #654
Fixes a bug in _io.py that caused JSONDecodeError in tests sometimes #683
Fixes a issue for some cases where the tests were timing out on windows
2018-07-23 13:23:04 -07:00
Don Jayamanne
501d163c5c System Tests for unhandled exceptions (#669)
* tests for unhandled exceptions

* Test source and fix linter issues
2018-07-23 10:25:10 -07:00
Karthik Nadig
bf8375830d
Update debug protocol json to latest (#676) 2018-07-18 10:31:10 -07:00