Commit graph

290 commits

Author SHA1 Message Date
Eric Snow
0d7e0d2656
Wait-on-exit before sending "disconnect" response. (#475)
(fixes gh-459)

We must wait-for-user before the "disconnect" response is sent. This PR fixes that.
2018-06-14 15:50:50 -06:00
Karthik Nadig
bbeebea696
Just my code (#467)
* Add set debugger property to support VS just my code

* Just my code initial code

* Limit continue to stepping and exceptions

* Improve skipping non-user code

* Fix tests

* Just my code shoudl skip ptvsd files

* fixes and updates (#1)

* Fix typo

* Use CMD_STEP_INTO_MY_CODE and CMD_SET_PROJECT_ROOTS

* Update tests to reflect the new pydevd exception breakpoint cmd args

* Fixes and improvements

* Simplify and refactor debug options

* Test fix and fix for debug property request handler for VS

* More fixes

* Test fixes

* Address comments

* Bunch of test fixes (#2)

* Test fixes

* Restoring auto-continue till pydev side work is done.
2018-06-14 11:02:38 -07:00
Fabio Zadrozny
8427816fca Fixes #338 (output is no longer buffered). (#476) 2018-06-14 11:01:24 -07:00
Eric Snow
d498fd3582
Remove code duplication in runner.py. (#469)
(fixes gh-464)

The code in ptvsd/runner.py was originally copied from elsewhere and slightly adapted. Over time the APIs diverged, which lead to the failure in gh-464. This PR fixes the problem by getting rid of the code duplication.
2018-06-12 17:32:47 -06:00
Eric Snow
617727ef7c
Clean up session handling in the daemon. (gh-463)
This is part of the effort to fix gh-459. While it doesn't fix it, it does clean up the Daemon code a little and resolves a potential issue with session lifecycle handling. The solution for gh-459 will build on this.
2018-06-07 11:52:35 -06:00
Eric Snow
e01084a991
Get the tests working on Windows. (#455) 2018-05-31 16:06:08 -06:00
Fabio Zadrozny
4add62eb58 When a thread is created, notify about it as soon as possible. (#430)
Fixes #106
* When a thread is created, notify about it as soon as possible.
* Properly mark internal threads as pydevd daemon threads.
Also fix tests to consider that the event related to thread
creation is given as the thread starts to run.
* Fix test flakiness and improve error message when messages are not equal.
2018-05-30 09:18:27 -07:00
Eric Snow
df207c6aa5
Add "live" breakpoint tests. (#376)
(fixes #364)
2018-05-29 10:37:38 -06:00
Karthik Nadig
64202812e2
Suspend all threads on pause (#440)
* Suspend all threads on pause.

* Update pause tests to account for pausing all threads
2018-05-25 15:21:21 -07:00
Eric Snow
322f694601
Support re-attaching to an adapter. (#381)
(fixes #208)

Currently when ptvsd starts up (as server) it listens for a connection and shuts down when the debug session is done. This prevents re-attach. To fix this we go back to listening for a connection after getting a "disconnect" (or the client closes the connection).
2018-05-22 16:50:55 -06:00
Karthik Nadig
36b5bdfc51
Filter ptvsd files while tracing (#408)
* Implement tracing filter for ptvsd files

* Tests for ptvsd file tracing

* Clean up regex

* Linter fixes

* Addressing comments.
2018-05-04 14:38:46 -07:00
Karthik Nadig
8a8ba9f449
Handle KeyError while getting or setting variables (#413) 2018-05-04 13:55:57 -07:00
Eric Snow
105032c3ae
Run most of the tests under Python 2. (#405) 2018-05-02 18:05:13 -06:00
Karthik Nadig
41d362708f
Fix for DownloadCommandTests and CheckCommandTests (#390)
* Fix for DownloadCommandTests and CheckCommandTests

* Using os.linesep as per review comments
2018-04-30 09:52:11 -07:00
Karthik Nadig
ecc4940eec
Hiding debugger internals from stack, modules, etc (#372)
* Hiding debugger internals from stack, modules, etc
* Move path based internals filtering to InternalsFilter class
* Add basic tests for InternalsFilter
* Linting and other fixes.
2018-04-23 10:57:48 -07:00
Eric Snow
7ca01fb2de
Clean up handling of vendored projects. (#383)
* Clean up handling of vendored projects.

* Add the ptvsd._vendored package.

* Try the new location and fall back to the old one.

* Fix a typo.

* Add ptvsd._vendored.list_all().

* Fix setup.py and tests/__main__.py.

* Exclude .pyc files (from python 2).

* Deal with implicit relative imports in 2.7.
2018-04-19 18:20:06 -06:00
Eric Snow
3b28050e70
Move shared functions to their own module (from __main__). (#373) 2018-04-18 13:20:16 -06:00
Eric Snow
ca5327530f
Wait until the end of VSCodeMessageProcessor.start() to start handling incoming messages. (#371)
* Do not process messages until start() is done.

* Drop hacks from tests.
2018-04-18 11:29:05 -06:00
Don Jayamanne
85e9720544
Support for log points (#352)
Second part of the fix for #350
Fixes #313
Fixes #350
2018-04-17 16:22:01 -07:00
Don Jayamanne
ab527c29ff
Ability to enable debugging of a program via a remote debugger (#348)
Fixes #251
Fixes #252
2018-04-16 19:09:11 -07:00
Eric Snow
0b96df8e01
Fix daemon testing. (#360)
* Pass the Daemon args during tests.

* Use placeholder exit handlers until connected.

* Do not install exit handlers if already installed.
2018-04-16 17:53:02 -06:00
Karthik Nadig
bb18114b7b
Implement hit condition breakpoint (#359)
* Implement hit condition breakpoint

* Fix tests to support hit-conditions
2018-04-16 16:17:44 -07:00
Eric Snow
55fc4cecef Add a --server-host CLI arg. 2018-04-16 21:30:31 +00:00
Eric Snow
d5f8e0bb54 Preserve the host in the server case. 2018-04-16 19:53:11 +00:00
Don Jayamanne
c069f1ccc8
Ability to run code without debugging (#341)
Fixes #339
2018-04-13 10:44:40 -07:00
Karthik Nadig
0562bcddc0 Don't exit on unknown command 2018-04-12 12:06:34 -07:00
Eric Snow
8354b6d01b Wait for the "output" event. 2018-04-11 22:52:28 +00:00
Eric Snow
388cda3282 Wait for the "output" event. 2018-04-11 22:28:12 +00:00
Eric Snow
ecf53a146c Wait for the "output" event. 2018-04-11 22:12:38 +00:00
Eric Snow
9cec610fce Do not expect -- in a test. 2018-04-11 21:46:46 +00:00
Eric Snow
2b410e263e Do not hardcode the ptvsd version. 2018-04-11 21:44:19 +00:00
Eric Snow
fba3fd0e91 Add lifecycle tests. 2018-04-11 21:44:19 +00:00
Eric Snow
834ca1af66 Fix DebugSessionConnection.is_client. 2018-04-11 21:44:19 +00:00
Eric Snow
60d4148131 Move VSCMessages and PyDevdMessages under the helpers package. 2018-04-11 21:44:19 +00:00
Eric Snow
041c197269 Factor out a Lockfile testing helper. 2018-04-11 21:44:19 +00:00
Eric Snow
3ee5990e32 Add tests for ptvsd.debugger.debug(). 2018-04-11 21:44:19 +00:00
Eric Snow
f0788af78f Factor out DebugAdapter.start_wrapper_script(). 2018-04-11 21:44:19 +00:00
Eric Snow
c81275fda4 Add a TODO. 2018-04-11 21:44:19 +00:00
Eric Snow
9d4e014517 Add DebugClient._connecttimeout. 2018-04-11 21:44:19 +00:00
Eric Snow
f3bfa1cff7 Add Workspace.write_python_script(). 2018-04-11 21:44:19 +00:00
Eric Snow
6cc5cca1fb Add DebugClient.host_local_debugger(). 2018-04-11 21:44:19 +00:00
Eric Snow
278640d0ec FakeEditor -> DebugClient. 2018-04-11 21:44:19 +00:00
Eric Snow
1d3e83a85c Clean up DebugAdapter. 2018-04-11 21:44:19 +00:00
Eric Snow
6b0fa35414 Move DebugAdapter to its own module. 2018-04-11 21:44:19 +00:00
Eric Snow
72be9f33e0 Move DebugSession to its own module. 2018-04-11 21:44:19 +00:00
Eric Snow
7be33ed9d2 Add the Proc testing helper. 2018-04-11 21:44:19 +00:00
Eric Snow
f9666d5147 Add TestsBase.pathentry. 2018-04-11 21:44:19 +00:00
Eric Snow
ac7b58e6d8 Add Workspace.write_script(). 2018-04-11 21:44:19 +00:00
Eric Snow
9f88f6fefd Add test_failure(). 2018-04-11 21:44:19 +00:00
Eric Snow
2061239672 Check the exit code. 2018-04-11 21:44:19 +00:00