Commit graph

801 commits

Author SHA1 Message Date
Pavel Minaev
55059ca379 Fix #810: Sub-Process: monkey patch pydevd to start process using ptvsd (#862)
* Fix #810: Sub-Process: monkey patch pydevd to start process using ptvsd

* Add --multiprocess to ParseArgsTests tests.

* Pass port range down to child processes, and let them pick a port themselves.

* Remove ptvsd.port and replace with debugging output.

Pick ports from the range randomly rather than always scanning start to end, to reduce collisions.
2018-10-11 14:01:39 -07:00
Karthik Nadig
fc921c0aef
Treat any code not in site-library as user code (#884)
* Remove explictly setting user project roots.

* Remove unsused function

* Update tests.
2018-10-11 11:27:00 -07:00
Dmytro Kyrychuk
ab6467ab3b Fix on_completions error when frameId is missing (#904) 2018-10-11 10:59:42 -07:00
Karthik Nadig
605b013ab6
Undefined variable error in breakpoint condition (#893)
* Enable CMD_SUSPEND_ON_BREAKPOINT_EXCEPTION

* Update tests

* Fix tests

* Fix tests

* Update tests for CMD_GET_BREAKPOINT_EXCEPTION
2018-10-10 10:35:23 -07:00
Fabio Zadrozny
59f37926ad Add support for monkey-patching pyside2. (#888) 2018-10-10 10:34:29 -07:00
Pavel Minaev
cb3bf1c164 Fix #894: Race condition in JsonMessageChannel (#895)
Register the request before sending the message that corresponds to it.
2018-10-09 17:49:31 -07:00
Naveen Vardhi
86f9d4a63f Don't add additional new line with @pyfile (#882)
Fixes #875
2018-10-06 22:16:36 -07:00
Ayush Shanker
ff107b96de fix json comments syntax highlight (#881) 2018-10-06 22:15:21 -07:00
Fabio Zadrozny
fcdb060b76 Allow configuring whether the debugger should stop/print errors when there's an exception evaluating a breakpoint condition. Fixes #853 (#876)
* Allow configuring whether the debugger should stop/print errors when there's an exception evaluating a breakpoint condition. Fixes #853

* Temporarily remove CMD_SUSPEND_ON_BREAKPOINT_EXCEPTION configuration (needs test fixes to be applied).

* Fix linting.
2018-10-05 13:48:42 -07:00
Fabio Zadrozny
8fd2c74cd4 Make sure that any folder ending with site-packages is considered a library. Fixes #854 (#877) 2018-10-05 12:54:49 -07:00
Igor Novozhilov
edf4297fb8 Fix debugging on Python 3.3.5 (#873)
https://github.com/Microsoft/ptvsd/issues/828
2018-10-04 09:48:52 -07:00
Karthik Nadig
170de0c659
Updating contribution details (#860)
* Add codeofconduct and contributing md files

* Updating contribution details

* Addressing comments.

* Some tweaks
2018-10-01 18:16:04 -07:00
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