Commit graph

429 commits

Author SHA1 Message Date
fabioz
fcf8cf6503 Fix set next statement with DAP. Fixes #1163 2019-03-21 10:15:22 -03:00
Pavel Minaev
6a785aba08 Disable test_argv_quoting on Python 2.7 on non-Windows platform due to #935. 2019-03-20 15:30:54 -07:00
Pavel Minaev
8f65903f66 Fix #1227: subprocess arguments incorrectly escaped inside the debugger
Re-implement argument quoting on Windows in accordance with
https://docs.microsoft.com/en-us/windows/desktop/api/shellapi/nf-shellapi-commandlinetoargvw
2019-03-20 15:30:54 -07:00
Fabio Zadrozny
6d2062bb37 Fix issues with django and jinja2 exceptions with just-my-code turned on. Fixes #1181 (#1243)
* Fix issues with django and jinja2 exceptions with just-my-code turned on. Fixes #1181

* Modules don't have __qualname__.

* Fix test to do a step out.

* Fix test for Jython.
2019-03-18 19:55:40 -07:00
Fabio Zadrozny
df028b829c sourceReference = 0 when file is mapped. Fixes #1203 (#1214) 2019-03-11 21:15:09 -07:00
Karthik Nadig
7de4f8fdf7
[WIP] Fixes #1174. Ensure keys are in hex for dicts, lists, tuples (#1225)
* Ensure keys are in hex for dicts, lists, tuples

* Restore return values test

* Addressing comments.

* Add pydevd tests and fixes
2019-03-11 19:33:36 -07:00
fabioz
2febabcbcd StackTrace request respecting just-my-code. Fixes #1187 2019-03-07 11:20:39 -03:00
Pavel Minaev
d450f57d36 Assorted test fixes. 2019-03-06 19:53:33 -08:00
Pavel Minaev
5e8861f0bc Fix attach() and enable_attach() with log_dir=, and add tests for various ways to enable logging. 2019-03-05 14:32:23 -08:00
Pavel Minaev
a26f5d0032 Fix #890: Provide option to enable logging
Implement logging framework, and use that in place of existing ad-hoc logging.
2019-03-05 10:49:51 -08:00
Karthik Nadig
09988bf012
Ensure that stopOnEntry test checks path (#1190) 2019-03-01 17:48:58 -08:00
fabioz
f67c735592 evaluateName of __len__ should be len(x) instead of x.__len__(). Fixes #1176 2019-02-28 08:25:14 -03:00
Karthik Nadig
7f06a7bde8
Add test for jmc stack frames (#1188) 2019-02-27 23:40:25 -08:00
Karthik Nadig
65719104ed
Enable delayed stack trace loading (#1182)
* Enable delayed stack trace loading.

* Fix linter.

* Addressing comments.
2019-02-26 15:08:31 -08:00
fabioz
6feaa9536e Improving resolvers format in pydevd. #1092 2019-02-25 17:14:34 -03:00
fabioz
2d060f7b0f Support scopes, stackTrace, setVariable, evaluate, setExpression and modules DAP messages in pydevd. #1092 2019-02-25 17:14:34 -03:00
Pavel Minaev
2bb23bc698 Fix #18: Set Next Statement 2019-02-25 12:06:16 -08:00
Fabio Zadrozny
fd2aea41f3 Fixes issue identifying ptvsd files (fixes stop on entry). #1159 (#1160) 2019-02-25 10:58:14 -08:00
Karthik Nadig
6006fe57a1
Fixes #1048. Enable reattach test with fixes (#1156)
* Enable reattach test with fixes

* Address comments
2019-02-19 21:30:26 -08:00
Pavel Minaev
93225fd0f9 Fix test_add_and_remove_breakpoint. 2019-02-14 20:36:18 -08:00
Pavel Minaev
43816065a4 Fix #206: Validate breakpoint targets
When setting breakpoints, validate line numbers against dis.findlinestarts() for the given file.
2019-02-14 20:36:18 -08:00
Karthik Nadig
30ae5434f0
Add more tests (#1149)
* Add django template exception tests

* Add flask template exception tests
2019-02-12 13:58:07 -08:00
Pavel Minaev
ea2310f3a6 Fix #1009: Provide a public API to register threads not created by Python for debugging 2019-02-11 21:08:42 -08:00
Pavel Minaev
41462087c3 Add support for named line markers to pyfile() fixture. 2019-02-11 18:39:26 -08:00
Pavel Minaev
a8309a3742 Fix #841: BreakOnSystemExitZero debug option is not respected 2019-02-11 18:39:26 -08:00
Karthik Nadig
32a2527291
Add test for attach using pid (#1145) 2019-02-11 12:23:39 -08:00
Fabio Zadrozny
16b4284132 Fix: #1142: Log points treated as breakpoints. (#1143) 2019-02-08 08:22:44 -08:00
Karthik Nadig
6a9646d4df
Add some tests for recent fixes (#1140)
* Add and remove breakpoint test

* Enable package launch test

* Address comments.

* tweak

* wait only for the last output event.
2019-02-06 17:56:59 -08:00
Pavel Minaev
5acbb39f5e
Disable test_path_with_unicode for Python 3.5 per #1124 (#1135) 2019-01-31 13:53:46 -08:00
Pavel Minaev
46856c0138
Fix #1125: No-Debug run (ctrl+F5) VSCode is unable to establish connection with debugger (#1128) 2019-01-28 16:30:33 -08:00
Pavel Minaev
26cc6b0a3d
Assorted test fixes for the Azure automated test run. (#1123) 2019-01-25 17:48:56 -08:00
Pavel Minaev
1bc879c16f Use pytest-xdist to speed up tests and continue running after timeout. (#1116)
* Use pytest-xdist to speed up tests and continue running after timeout.

* Use unique server ports for Django and Flask tests.
2019-01-22 16:37:00 -08:00
Karthik Nadig
a9df5bfeeb
Map '.' in remoteRoot to current working dir (#1111)
* Map to cwd when remote root is '.'

* Add test for '.' remote root

* Move remote root resolution to a separate function

* print local path and frames in test
2019-01-20 21:55:47 -08:00
Karthik Nadig
72c549c6f5
Restrict wait on exit tests to launch only (#1104) 2019-01-17 11:02:33 -08:00
Pavel Minaev
8f68b3d359
Port refactored command line parser to master (#1105)
* Fix #1090: Port refactored command line parser to master

* Fix #921: Double dash in program arguments gets caught and crashes pydevd

* Fix #1013: -h/--help arg to program instead shows help for interpreter
2019-01-16 20:26:39 -08:00
Karthik Nadig
9aaf937478
Removing old test code (#1088)
Removing old test code
2019-01-07 13:38:32 -08:00
Pavel Minaev
ca5d822339 Remove unneeded tests. 2018-11-19 01:54:57 -08:00
Pavel Minaev
a2bdacbe9c Move ptvsd/ to src/ptvsd/. 2018-11-19 01:54:57 -08:00
Karthik Nadig
cc5d57a192
Migrate to pytests from tests\ptvsd (#1024)
* Migrate parse args tests

* Remove old parse args tests

* Run only pytests

* Migrate internals filter tests

* Remove old internal filter tests

* Migrate pathutils tests

* Remove old pathutils tests

* Revert "Run only pytests"

This reverts commit eaed6de3c64e102a540b751b06d774dab0930427.

* Remove old _local.py tests
2018-11-16 13:59:25 -08:00
Karthik Nadig
bd03d3a523
Merge into master (#1020)
* Migrate debugger tests (#968)

* Remove references to old test code (#1019)
2018-11-14 16:40:00 -08:00
Pavel Minaev
73dafb2730 Remove test_live_pydevd - these are unstable, and the same functionality is now covered by pytests. 2018-11-08 17:06:13 -08:00
Karthik Nadig
1139b400c8
Integrate single suspend event change to master (#974)
* Provide a single notification when a breakpoint is hit. #805 (#922)

* Provide a single notification when a breakpoint is hit. #805

ptvsd requires all threads to be stopped or all threads to be running
(this is a limitation for vsts), so, we generate a single notification
when a breakpoint is hit and have CMD_GET_THREAD_STACK wait to get the
actual stack (or if the thread is not paused in a timely manner,
provide the stack as it is, but in this case it may not be possible
to get the locals or interact with the frame -- issued commands
will timeout).

* Rename CMD_SUSPEND_ON_BREAKPOINT_EXCEPTION to CMD_PYDEVD_JSON_CONFIG.

* Fixes to ptvsd tests related to differences of thread events after changes to PyDBCommandThread.

* Make ptvsd use CMD_THREAD_SUSPEND_SINGLE_NOTIFICATION and CMD_THREAD_RESUME_SINGLE_NOTIFICATION.

* Fixing tests.

* Sleep on wait_for_attach() (should be removed later) -- it seems there's still a racing condition as wait_for_attach() seems to proceed before CMD_PYDEVD_JSON_CONFIG is passed on to pydevd.

* Test changes needed to integrate 805 (#969)

* Integrate 805 initial

* Fix send suspend event to use single suspend event command

* Fix thread run event tests.

* Fix event ordering

* fix reattach tests

* Increase timeouts for some tests.

* Fix more tests

* fix typo

* Skip flaky/redundent re-attach tests

* more cleanup

* Replace completions tests with pytests

* Ensure continued is sent when the thread runs.

* Dont wait for continued in completions tests.

* Revert "Ensure continued is sent when the thread runs."

This reverts commit caef558fcf4d890d01bf3e5694b3dbc42795aaaf.

* Skip broken tests.

* Parametrize completion tests
2018-11-01 15:12:21 -07:00
Karthik Nadig
ca27f00f85
Revert "Fix #941: Custom event with process information (#942)" (#963)
This reverts commit a2832aeae8.
2018-10-29 11:24:11 -07:00
Karthik Nadig
5b65c8b954
Migrate modules manager, safe repr, and socket tests (#955)
Fixes #958 #957 #956
* Migrate modules manager and socket tests
* Migrate safe repr
2018-10-25 13:32:13 -07:00
Karthik Nadig
5f777818aa
Tests for break on start, wait for normal and abnormal exit (#952)
* Add variables and evaluate tests

* Add sort order and evaluate tests

* Ensure the last output is seen

* Add stop on entry tests, normal and abnormal exit tests

* Fix tests for 2.7

* Fix minor linting issue
2018-10-24 12:37:51 -07:00
Pavel Minaev
a2832aeae8 Fix #941: Custom event with process information (#942)
* Fix #941: Custom event with process information

* Fix tests to accommodate the new ptvsd_process event.

* More test fixes for 'ptvsd_process'.

* Fix tests

* Fix more tests
2018-10-22 20:48:58 -07:00
Pavel Minaev
c7ee9277f3 Fix #896: Changes in CLI arguments between versions
Merge changes from v4.1.4-branch into master.
2018-10-18 15:02:34 -07:00
Pavel Minaev
bd220d0333 Fix #925: Make --host a required switch 2018-10-17 13:29:09 -07:00
Pavel Minaev
90f8bac273 Fix linting issue. 2018-10-14 21:15:35 -07:00
Pavel Minaev
5065397489 Remove test checking that CMD_PROCESS_CREATED is unsupported. 2018-10-14 21:15:35 -07:00