Commit graph

1945 commits

Author SHA1 Message Date
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
Fabio Zadrozny
fb27b4187f Fix for #501 and #479 (issues related to pausing a thread with debugger.set_suspend) (#508)
* Fix issue where pydevd threads could end up being traced.

* Make sure that the stepping command is properly set when a thread is suspended. Fixes #501, #479
2018-06-21 14:22:20 -07:00
Eric Snow
0bffee873a
GH-512: Fix single-frame stack trace handling. (#513)
(fixes #512)

The XML library we are using treats a single-item list as a single item instead of a list. This breaks on_stackTrace(). This PR fixes the problem by converting xframes to a list before checking its size.
2018-06-21 12:56:43 -06:00
Fabio Zadrozny
5848ac7b6c Fixes issues hitting breakpoints multiple times. Fixes #491. (#511) 2018-06-21 10:55:27 -07:00
Fabio Zadrozny
8585856eee No longer raising UnsupportedPyDevdCommandError when stdin input is requested. Fixes #490. (#505) 2018-06-20 14:33:48 -07:00
Karthik Nadig
e69d534dae
Fix for KeyError in suspended event handle during attach (#507)
* Fix for KeyError in suspended event handle during attach

* Fix typo

* Address comments.
2018-06-20 13:35:34 -07:00
Karthik Nadig
33f49c3778
Couple of bug fixes (#495)
* Add --version switch to ptvsd

* Fixes passing pydevd args correctly and enables QT support

* Update ParseArgsTests
2018-06-19 17:26:30 -07:00
Eric Snow
ea02ca59e6
Check against the actual filename in pathutils tests. (#500)
(fixes gh-243)

Under some corner cases the tests for pathutils fail, due to how Python's import system does not resolve casing on filenames. This PR fixes that.
2018-06-19 17:45:47 -06:00
Eric Snow
115bdc164c
Handle exit explicitly. (#499)
(fixes gh-459)

Our exit handling was all over the place. I've refactored the code to properly separate concerns. One consequence is that this fixes wait-on-exit.
2018-06-19 13:50:43 -06:00
Karthik Nadig
4bc9ab6eaa
Fix for displaying non-user code (#496)
Fix for displaying non-user code
2018-06-19 11:00:36 -07:00
Karthik Nadig
ac33985097
Fix for missing Description.md (#493) 2018-06-17 19:31:15 -07:00
Karthik Nadig
5464b0d3cf
Update pypi info (#480)
* Update pypi info

* Using python_requires to makesure pip only download on supported versions of python
2018-06-15 12:59:01 -07:00
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