Commit graph

709 commits

Author SHA1 Message Date
Don Jayamanne
14982d90ba
Fix path mappings with remote debugging (#624)
Fixes #610
2018-07-10 15:09:16 -07:00
Fabio Zadrozny
2b0140e22c Fix for #620: Mix of unicode and str in filename conversion. (#621) 2018-07-10 10:35:11 -07:00
Eric Snow
10af45bccc
A bunch of cleanup/lint fixes for the system tests. (#625)
The system tests have a number of minor formatting and structural issues that would be better to clean up sooner rather than later. This PR addresses nearly all of them.
2018-07-09 17:14:57 -06:00
Eric Snow
b25d654987
Do not check __main__.__file__ under -m. (#619)
(fixes #592)

Under certain circumstances, __main__ is a "builtin" module. Such modules do not have a __file__ attribute. Consequently, this caused the pydevd injection code to fail. This PR fixes that.
2018-07-09 12:04:42 -06:00
Don Jayamanne
2bc5b2c976
Tests for attaching by host names (#613)
* Attach tests
* linter issues
* Disable test
2018-07-07 00:11:14 -07:00
Karthik Nadig
8d140b2d03
Add hit condition tests (#601)
* Add hit conditon tests

* Handle potential race condition.
2018-07-06 22:58:53 -07:00
Don Jayamanne
ab34316cc9
Refactor test classes in system tests (#612) 2018-07-06 20:53:12 -07:00
Karthik Nadig
852f4dbb0f Fixes a bug that forced host to always be localhost. (#611)
#578
2018-07-06 20:52:19 -07:00
Don Jayamanne
d438548e93
Do not send terminated event when restarting (#604)
Fixes https://github.com/Microsoft/ptvsd/issues/603
2018-07-06 18:25:00 -07:00
Derek Keeler
e33688d52b
Update verbosity when we create junit-style output report files (#608) 2018-07-06 15:56:48 -07:00
Karthik Nadig
0be3795eb4
Some pathutils fixes (#589)
* Fix pathutil tests

* Handle IndexError in pathutils
2018-07-06 13:08:34 -07:00
Fabio Zadrozny
6b20c67794 Fixes deadlock when creating thread. (#591) 2018-07-05 18:10:15 -07:00
Don Jayamanne
867bdd3bd5
System tests for logpoints 2018-07-05 17:26:05 -07:00
Don Jayamanne
1ffabd204d
System tests for conditional breakpoints 2018-07-05 17:11:47 -07:00
Don Jayamanne
389a1b1f1e
System tests for breakpoints across files (#598) 2018-07-05 16:49:14 -07:00
Don Jayamanne
04f24a29d8
Add tests to validate arguments passed for debugging (#596)
* Add tests to validate arguments
* remove unused imports
2018-07-05 15:25:17 -07:00
Don Jayamanne
1a9112262b
Add delay waiting for socket server to start (#594)
Add delay waiting for socket server to start and port to be free
2018-07-05 14:52:43 -07:00
Don Jayamanne
aa5a4ef524
Tests for remote debugging with handled exceptions (#590) 2018-07-05 12:12:39 -07:00
Karthik Nadig
cc91ab5d1f
Enable exception breakpoint (#585)
* Enable exception breakpoint

* Fix typo

* Fix cmd version platform
2018-07-03 21:52:31 -07:00
Karthik Nadig
a8b2fee5c8
Add tests to verify variable sorting (#584) 2018-07-03 19:21:23 -07:00
Don Jayamanne
a223861781
Integration tests to ensure debugger does not break when exceptions are handled (#583)
* Import unittest
* Fixed linter
2018-07-03 18:04:27 -07:00
Don Jayamanne
02941fcd39
Test for evaluateNames in response of variables request 2018-07-03 08:22:48 -07:00
Don Jayamanne
a4c5ce3925
Fix sourceReferences in tests (#575)
* add path mappings
* debug
* test path mappings
* Fix source ref
* remove debug statements
2018-07-03 08:19:48 -07:00
Don Jayamanne
8712a33e99
Some more fixes to broken tests (#574)
* Some more fixes to broken tests
* Fix linter
2018-07-02 23:15:11 -07:00
Don Jayamanne
c29d5bf59a
Wait for attach to complete before proceeding
* Wait to attach
* The life cycle gets tests in other places and it was a faulty test
* remove unused import
2018-07-02 18:43:08 -07:00
Don Jayamanne
83cad60ab4
Wait for socket server before connecting in Tests (#565)
* Wait for socket server
* wait for process event
* remove debug statements
2018-07-02 18:15:16 -07:00
Karthik Nadig
3edc26db91
Add 'evaluateName' to top level variables (#566)
* Fix miss eval name for top level variables.

* Update tests.
2018-07-02 18:07:09 -07:00
Don Jayamanne
86c9685ff2
System tests for basic attach (#563)
Also fixed issue causing connection errors tests
2018-07-02 16:42:58 -07:00
Don Jayamanne
1b98aa459e
Test termination of program (#561)
* Test variables, values and evalation
* Tests for termination
* Fix linter message
2018-07-02 16:27:00 -07:00
Don Jayamanne
2d4a17ef0c
System tests test for listing and evaluation of variables (#560) 2018-07-02 16:25:25 -07:00
Karthik Nadig
8014278cfe
Handle multi-line console commands. (#557)
* Fixes issue with multi-line evals.

* Add multi-line evaluate test case
2018-07-02 14:37:22 -07:00
Don Jayamanne
26deb49008
Add await for easier testing (#550)
Fixes #543
Fixes #555
2018-07-02 13:30:26 -07:00
Karthik Nadig
a8b85fe9d9
Fixes and tests for no-debug run (#552)
* Move pydevd defaults to _local.py

* Fix tests

* Handle args for no-debug case

* Add no-debug run tests
2018-07-02 11:21:27 -07:00
Don Jayamanne
f79dc70191
Enable debugging of files wth unicode chars in Py2.7 (#514)
* Enable debugging of files with unicode chars in Py2.7
* Fixed code review comments
* Add tests
* Fix encoding
* fix linter errors
* Fixed more linter errors
* Test 3.6 for coverage
* Revert change
* Skip tests
* Fix linter issue
2018-06-29 14:41:30 -07:00
Don Jayamanne
0ae06c77bf
Integration tests when launching debugger to debug files (#539)
Fixes #258 

Scenarios:
* Launch Files
* Launch files with custom cwd

For each of the above scenarios:
* Test output
* Test breakpoints 
* Test log points
* Test conditional breakpoints
* Test run to completion
2018-06-29 13:17:50 -07:00
Fabio Zadrozny
b0b0d51fde Fix issues related to path translations and case of files seen on client. (#533) 2018-06-29 11:29:28 -07:00
Fabio Zadrozny
8c4dfdc526 Fix issue where additional info could be None (#529)
* Fix issue where additional info could be None (reported at: https://www.brainwy.com/tracker/PyDev/923).

* Fix flaky test.
2018-06-28 11:37:11 -07:00
Karthik Nadig
14cf283208
Fixes issue where multiple thread created events were sent for the same thread (#537)
* Fixes issue where multiple thread created events were sent for the same thread.

* Fix tests
2018-06-28 08:34:29 -07:00
Eric Snow
bd390322a8
Use sys.exit() instead of os.kill(). (#538)
(see #530)

os.kill() terminates the process immediately. However, we need the "disconnect" response to be sent (indirectly via the atexit handler). This PR switches to sys.exit() solve the problem.  We still terminate the process early if disconnecting during a launch session.
2018-06-27 16:03:17 -06:00
Fabio Zadrozny
b81a0df71d Add missing 'import os'. (#528) 2018-06-27 14:12:17 -07:00
Eric Snow
4476d0da6f
Send the disconnect response before closing the client socket. (#531)
(see #530)

We were sending the "disconnect" response only after closing the socket, meaning the response was never actually sent. This PR fixes that by ensuring the response is sent as late as possible, whether or not it is a "single session" situation.
2018-06-27 14:25:48 -06:00
Eric Snow
523d9c2def
Reset session-dependent debugger state upon detach. (#527)
(fixes #285)

We were not clearing things like breakpoints nor resuming threads when an "attach" session disconnnected. This caused problems, e.g. when disconnect happened with a thread stopped for a breakpoint. This PR fixes the problem by resetting all session-dependent debugger resources after the "disconnect" response has been sent (only for an "attach" session).
2018-06-26 15:27:48 -06:00
Don Jayamanne
d4a3e79478 Fix log points on Python 2.7 (#520)
* Fix log points on Python 2.7

* Fix more tests

* More fixes

* Fix format expr
2018-06-25 16:41:37 -07:00
Hugues Valois
26fae95019 Update setup.py (#522) 2018-06-25 16:31:45 -07:00
Eric Snow
68f3688e1d
Add breakpoints before CMD_RUN is issued. (#521)
(fixes #448)

While #502 helped with the race between enable_attached() and adding breakpoints, there was still a small race left. This PR fixes it by CMD_RUN is not issued until after the breakpoints have been added.
2018-06-25 17:31:00 -06:00
Karthik Nadig
618a107e11
Compatibility python 3.4 (#519)
* Test compat fixes for python 3.4 tests

* Enable python 3.4 CI in travis

* Fix for 3.4 missing text in traceback list

* Fix linter

* Add python 3.4 to classifiers

* Fix for line text
2018-06-25 13:20:22 -07:00
Don Jayamanne
ca30f3e01c github issue template (#517) 2018-06-25 11:14:23 -07:00
Derek Keeler
259056be9f
Re-enable disabled test from prior PR (#515) 2018-06-22 08:32:36 -07:00
Derek Keeler
e80a669624
Update for VSTS-based CI process (#431)
* Add flake8 configuration files
- .flake8.ci: addendum config for CI to make use of only.
* Add build badge for CI in VSTS
* Enable JUnit style test file output.
- convert_args return value simplified
- allow original style of unittest reporting as well
- remove unnecessary flags from junit xmlrunner
* Use argparse to collect runtime configuration of tests module
2018-06-21 17:09:53 -07:00
Eric Snow
ac8faf9dfe
Wait for handshake completion when waiting for attach. (#502)
(see gh-448)

There is a race between attach and handshake completion that may result in breakpoints not being hit. This PR fixes that by waiting for handshake completion when waiting for attach.
2018-06-21 17:31:52 -06:00