Commit graph

1945 commits

Author SHA1 Message Date
Fabio Zadrozny
daf9206912
Support running code in target process to attach to pid in Linux. Partial fix for #863 (#1525) 2019-06-19 09:11:38 -03:00
Pavel Minaev
5b10a74698 Blacken newly written code. 2019-06-19 01:06:57 -07:00
Pavel Minaev
b9e02b9e79
Fix and improve comments and docstrings 2019-06-19 00:58:30 -07:00
Pavel Minaev
106f9a8852
Fix outdated comment 2019-06-19 00:13:21 -07:00
Pavel Minaev
1e6ba092d3 Refactor messaging:
- better propagation of messages and errors
- implicit error handling for invalid messages
- fix various issues related to disconnecting

Fix messaging tests.

Separate formatter from logging for reuse.

Add more Python 2/3 compatibility helpers.
2019-06-18 18:08:49 -07:00
Fabio Zadrozny
1fce9beeb0
Support attach to pid with Python 3.7. Fixes #846 (#1521) 2019-06-17 08:37:25 -03:00
Karthik Nadig
59ef76317b
Move more code to pydevd (#1519)
* Add systeminfo to pydevd

* Move more code to pydevd

* Address comments.
2019-06-13 16:17:26 -07:00
Karthik Nadig
f3b0bb0cdc
Add systeminfo to pydevd (#1514)
* Add systeminfo to pydevd

* Address comments

* Fix tests
2019-06-13 10:23:38 -07:00
Fabio Zadrozny
7f76c4b284 Don't fail attach to pid if 'ProgramFiles' env var is not available. Fixes #1144 (#1515) 2019-06-13 10:23:04 -07:00
Fabio Zadrozny
7c33548f6a
Stepping in multi-threaded case should continue other threads. Fixes #1372 (#1513) 2019-06-13 07:39:19 -03:00
Pavel Minaev
336d8609a7 Fix and refactor message propagation API. 2019-06-12 13:24:08 -07:00
Pavel Minaev
0471474afe Remove unnecessary import. 2019-06-10 14:58:54 -07:00
Pavel Minaev
d68a5da4b1 Disable failing test_breakpoint_function per #1505 2019-06-10 14:58:54 -07:00
Pavel Minaev
deedc8f57b Fix #1486: Message processing/forwarding loop
Implements the main message loops for IDE and debug server communication channels, and framework for DAP message handlers.

Lays out scaffolding for debuggee process management and connectivity.

Implements generic message propagation between IDE and debug server.

Partially implements playback of the initialization sequence when debug server is connected (without validation).

Implements `initialize`, `disconnect`, and `terminate` DAP messages.

Partially implements `attach`, `launch`, and `configurationDone` DAP messages.
2019-06-10 14:58:54 -07:00
Pavel Minaev
ee7710adf6 Fix #1502: Concurrent DAP request processing
Add support for "yield" in request handlers.
2019-06-07 02:46:41 -07:00
Pavel Minaev
53aa9e8797 Fix linting issues. 2019-05-30 14:10:01 -07:00
Pavel Minaev
7fbd5feebf Fix imports to reflect the new package layout. 2019-05-30 13:47:56 -07:00
Fabio Zadrozny
862a0c1cf7
Show message when stepping into library code with justMyCode=true. Fixes #1298 (#1468) 2019-05-30 11:08:29 -03:00
Fabio Zadrozny
016b557b88
Properly validate breakpoints. Fixes #1191 (#1462) 2019-05-25 08:29:32 -03:00
Pavel Minaev
8cca9fcd7a Reorganize source code to reflect the split between the adapter proper and the debug server. 2019-05-23 15:14:50 -07:00
Karthik Nadig
9a263f9f17
Add json-dap command line and debug options (#1461)
* Add json-dap command line and debug options

* Addressing comments.
2019-05-23 10:44:04 -07:00
Karthik Nadig
8413411146
Remove more unused code. (#1459) 2019-05-22 13:28:27 -07:00
Karthik Nadig
025c6c2f63
Ensure stop_on_entry is unset after first break. Fixes #1456 (#1457)
* Ensure stop_on_entry is unset after first break

* Update tests
2019-05-21 23:23:01 -07:00
Fabio Zadrozny
ff979215fc
Don't use sys.prefix for library roots. Fixes #1422 (#1455) 2019-05-21 15:28:13 -03:00
Fabio Zadrozny
5e93cfde81
Properly forward sys.stdin.read(). Fixes #1423 (#1438) 2019-05-21 08:46:21 -03:00
Fabio Zadrozny
ba04a8ec6d
No longer switch off getpass on import. Fixes #988 (#1436) 2019-05-21 08:46:12 -03:00
Pavel Minaev
2ef2bd97a8 Remove ptvsd.debugger.run() 2019-05-20 20:28:16 -07:00
Pavel Minaev
ef6efe2176 Fix #1413: Stop on entry hangs the debugger
Reimplement ptvsd.debugger.debug() VS entry point via ptvsd.__main__.
2019-05-20 20:28:16 -07:00
Karthik Nadig
ec7f31a92a
Remove unused code (#1453)
* Remove unused pathutils

* Remove unsed run_code (#6)
2019-05-20 14:38:21 -07:00
Fabio Zadrozny
202ee99125 Update pydevd_schema with latest debugProtocol.json. Fixes #1434 (#1435) 2019-05-20 13:15:45 -07:00
Karthik Nadig
a8c1f32b58
Switch to schema args (#1431) 2019-05-17 15:35:15 -07:00
Karthik Nadig
afccb47ec9
Remove non-json calls. Fixes #1419 (#1426)
* refactor non-json commands in wrapper

* Remove is_process_event and use pydevd config done

* Address comments.

* Name changes and cleanup
2019-05-17 12:42:21 -07:00
Fabio Zadrozny
f115036d8b
Improve object repr slicing on Python 2. Fixes #1407 (#1429) 2019-05-17 11:27:50 -03:00
Fabio Zadrozny
343ad5fbed Provide breakpoints in response. Fixes #1408 (#1425) 2019-05-16 14:24:33 -07:00
Fabio Zadrozny
e298fc54b4
Send DAP process event from pydevd. Fixes #1338 (#1420) 2019-05-16 09:19:30 -03:00
Karthik Nadig
3e89bde5ac
Ensure stop on entry reason is entry. Fixes #1387 (#1415)
* Ensure that stopped reason is 'entry' for stop on entry.

* Update cython wrappers

* Revert "Update cython wrappers"

This reverts commit d98efe2d8d1c0bf496b4f7905bc261170ac7477f.

* Generate .pyx and .c files.

* Update name

* .

* Update tests

* preserveFocusHint should be false for `entry`

* Fix #1418 and clean up

* Add log message if no main thread is found
2019-05-14 10:22:50 -07:00
Fabio Zadrozny
f39747ceba
Provide disconnect/reconnect and a non-blocking way of setting up the debugger. Fixes #1382, Fixes #1248. (#1414) 2019-05-10 14:17:12 -03:00
Karthik Nadig
2653656cef
Redirect output setting changes (#1405)
* Move more settings to pydev

* Deprecate redirect output argument.

* Use warn.

* Add tests and cleanup
2019-05-08 11:48:11 -07:00
Fabio Zadrozny
ef6a679d0e
DAP: stop sending some events from pydevd. Fixes #1342 (#1406) 2019-05-08 10:31:15 -03:00
Fabio Zadrozny
8dcd570a2e
Check if returned thread id is valid in on_evaluate_request. Fixes #1401 (#1402) 2019-05-06 08:59:23 -03:00
Fabio Zadrozny
3ad4bdd5b5
Allow the SetDebuggerPropertyRequest to be called after get_file_type. Fixes #1355 (#1400) 2019-05-06 08:58:25 -03:00
Fabio Zadrozny
5b50869cc3
Fix thread cleanup issue on forking (debugger could crash when subprocess pool was closed). (#1396) 2019-05-02 17:13:18 -03:00
Karthik Nadig
6292fa817f
Minor improvements to troubleshooting instructions (#1395)
* Minor improvements to troubleshooting instructions

* Address comments.
2019-05-01 18:27:56 -07:00
Fabio Zadrozny
e44dc09f57
Make it possible to edit variables in containers through the DAP. Fixes #1385. (#1391) 2019-04-30 14:32:33 -03:00
fabioz
bf954e66d1 Always send goto response / using env variable to determine whether the cython compile command line should be shown. 2019-04-30 14:30:23 -03:00
Fabio Zadrozny
eb41c048a4 Make it possible to use debugger in IronPython again. (#1388) 2019-04-29 16:38:23 -07:00
Karthik Nadig
e561e8ca6c
goto response via DAP. Fixes #1343. (#1386)
* Send a reponse to goto from pydevd

* Ensure seq number is passed correctly

* Remove event handler for set next

* Address comments
2019-04-29 11:53:31 -07:00
fabioz
3711d92935 Properly handle case where a thread event can be sent before issuing a threads request. 2019-04-29 07:58:44 -03:00
fabioz
11490c11cb Handle TypeError (raised during interpreter shutdown on ci). 2019-04-29 07:58:44 -03:00
fabioz
b44a17647b Showing pydevd logs on ptvsd failures on ci. 2019-04-29 07:58:44 -03:00