69 Commits

Author SHA1 Message Date
Andrey Lisin
af17569930 PyDev: On Python 3.11 _fork_exec now needs to be monkey-patched for subprocesses (PY-61217)
GitOrigin-RevId: 2126b45205530086aa5ec3dff630e39a5947c905
2024-06-03 13:27:37 +00:00
Andrey Lisin
28dbb080a7 PY-37366 Clear cached main thread ID when forking process
GitOrigin-RevId: 40584fe774221c25a771d99bdc6949ffbd046b39
2024-01-04 10:30:44 +00:00
Andrey Lisin
ba00d2d72a PY-64287 Fix debugging of Django projects
GitOrigin-RevId: c1173f76e7552f84b80e8a8ef73c63dc52457f1f
2023-11-24 14:34:49 +00:00
Andrey Lisin
762ac48e88 PY-64110 Handle possible -X interpreter options properly
GitOrigin-RevId: ecd44cd7b6746b886f70e43487278503fe395a04
2023-11-16 16:33:42 +00:00
Egor Eliseev
68947cc4dc PY-57217 Breakpoints are ignored with Python 3.11
IJ-CR-103963

GitOrigin-RevId: 18faf5bc5c995decc948cbe1314773b0776ffc63
2023-03-13 21:27:10 +00:00
Egor Eliseev
7ec061b418 PY-37311 Patch interpreter command for Python 2
IJ-CR-26283

GitOrigin-RevId: 24575b5177831685d56f66c5546800c66553bd19
2022-09-07 12:39:17 +00:00
Andrey Lisin
b30c8b2915 PY-48506 os.PathLike is only available in Python 3.6 and above
GitOrigin-RevId: 23e5e900cc9a9faa32703cbd8ea4b19141dd86c2
2022-07-27 08:32:45 +00:00
Eyal Halpern Shalev
2381494f91 PY-48506 #pr2032 Support PathLike objects for subprocess
This fixes https://youtrack.jetbrains.com/issue/PY-48506/error-on-pydevmonkey-in-debug-mode-AttributeError-PosixPath-object-has-no-attribute-endswith by checking if the path is `PathLike`, and calling `__fspath__()` to get the string version of the path.

GitOrigin-RevId: 012913359ea48e2798a80ebe2d0732ba8297daa7
2022-06-03 11:06:04 +00:00
Andrey Lisin
c210c28ab5 PY-49453 Replace the rest of deprecated methods in debugger
(cherry picked from commit f6f7f0ffed6cd2d51410e9fe07267f813b4c4ff1)

IJ-MR-22034

GitOrigin-RevId: eff02449dcab685184cb9c7d4e86fb9766fb5196
2022-05-24 13:07:16 +00:00
Andrey Lisin
8e73fa69fd PY-44245 Fix debugger leakage through thread-local storage
The bug was caused by the improper clean-up of the thread-local information. `clear_thread_local_info()` was meant to clear the thread-local information from the common Cython module but actually reset the `_thread_local_info` from a version-specific module. This lead to the debugger instance leakage to new processes. This, in turn, caused debugger crashes and freezes.

(cherry picked from commit 2fd3ac3dc5657490b451cf4f0e62e715b65e461f)

IDEA-CR-68594

GitOrigin-RevId: 75e056b6d9cc82aceb0ef2cb51152c7bf81b4b94
2020-11-16 11:49:04 +00:00
Andrey Lisin
c5b8178539 PY-45053 Disable tracing for new processes created with os.fork() when automatic attaching to subprocess is disabled
(cherry picked from commit 78b4b62d5992f775e54c59a81b065925467e6c31)

IDEA-CR-68169

GitOrigin-RevId: a1e4a9d2a42c62ba6629f1f91bbd17bcb27dfef5
2020-10-29 10:52:21 +00:00
adw1n
05364772dc IDEA-CR-60415: PY-41234 #pr852 Fix patching args in monkey patched subprocess module
Signed-off-by: Elizaveta Shashkova <Elizaveta.Shashkova@jetbrains.com>

GitOrigin-RevId: 26468a4d6629e71ccdb2a9c9931fd2ddc39b6488
2020-03-25 17:17:50 +00:00
Elizaveta Shashkova
5c67bc0373 IDEA-CR-56419: PY-34555 Clean module flag for child process
If a process was started with `-m` key (and converted to `--module` flag), this parameter will be passed to all its child processes. So we need to clear this flag in SetupHolder before patching arguments

GitOrigin-RevId: 00ae0b23fc6107bee75272a03a5bd15ca474fbc7
2019-12-10 15:38:42 +00:00
Andrey Lisin
ba365df917 PY-38941 Support debugging of processes created with posix_spawn
(cherry picked from commit e55c2168595e22e80a8f95c2e3812cf7f687c31c)

GitOrigin-RevId: 4db4aaaa9ce7198cfb5177bac262f9f72b92cdee
2019-11-19 17:05:35 +00:00
Andrey Lisin
ce85c0c191 PY-37757 Don't fail when running subprocess on IronPython
GitOrigin-RevId: b1f77734413a4d027137bad55a87e0008b8d9590
2019-09-16 10:02:18 +00:00
Andrey Lisin
102a335f22 PY-37092 Add Foundation framework hack for Python 3.5 and 3.6
GitOrigin-RevId: e75e3c30800fa8bf24dc249602e574d6daef21cb
2019-08-30 16:02:59 +00:00
Rustam Vishnyakov
123242c4b2 EditorConfig documentation test
GitOrigin-RevId: fd52ace3d7a32ecd02c2c5ab90e077967604c15e
2019-06-16 04:03:21 +03:00
Egor Zhdan
c1813cfb52 Cleanup: NotNull/Nullable
GitOrigin-RevId: b8e892f32ea84c2115973155dba7127b892cc36e
2019-06-16 04:02:08 +03:00
Anna Kozlova
91f7445298 constructor reference: don't ignore constructor parameters during method reference inference (IDEA-185578)
GitOrigin-RevId: e836468e05db28157713e9edd3c70382f8ecdebc
2019-06-13 03:15:49 +03:00
Egor Zhdan
39d2d77155 Cleanup: NotNull/Nullable
GitOrigin-RevId: b8e892f32ea84c2115973155dba7127b892cc36e
2019-06-13 03:14:35 +03:00
Julia Beliaeva
3fee046d20 [vcs-log] cleanup RootCellRenderer
GitOrigin-RevId: bba216626193ac756cd133b8ae9bc4e577abea42
2019-06-10 04:10:14 +03:00
Eldar Abusalimov
dcaeb8f8c7 OC-4061: ApplicationUtil: Make runWithCheckCanceled() return result
GitOrigin-RevId: 3aa9f23cc5097e644eddf82a4faca669759b4760
2019-06-10 04:09:35 +03:00
Elizaveta Shashkova
f8ef1eaa95 PyDev: Don't use thread.ident because a new thread may end up having the same id of an old thread.
GitOrigin-RevId: 63fbcd2fe5ae1f46d93c496d1e7b2016f85a7d07
2019-06-07 18:10:40 +03:00
Elizaveta Shashkova
846ac82c42 PyDev: Re-enable frame eval mode in the debugger. ptvsd:768
GitOrigin-RevId: 95f9b011f580edc3ada13c45844dfb76f7782778
2019-06-07 18:04:01 +03:00
Elizaveta Shashkova
f89c94a248 PY-31603 Concurrency visualizer reports too many threads
GitOrigin-RevId: 419e4368b425701fcc0bf57e54d3cfbd810c741a
2019-06-07 17:50:44 +03:00
Elizaveta Shashkova
de00e4939a PyDev: CI support and fixes for Jython, Python 3.7, pytest with xdist
GitOrigin-RevId: 29ad79190e0a5d0a15e2419a16c002b0b597d7ae
2019-06-07 17:41:04 +03:00
Elizaveta Shashkova
73951ef560 PyDev: Moving utilities related to getting the global debugger to pydevd_constants.
GitOrigin-RevId: 5e721bdf840fb9a48a73298e5bea347f612fc9ef
2019-06-07 17:27:49 +03:00
Elizaveta Shashkova
719a951b99 PyDev: Fix deadlock in command evaluation when it created a new thread and waited for it.
GitOrigin-RevId: 868e47acb03c52b5a3ff2bbf24f67102e74a5486
2019-06-07 17:17:39 +03:00
Elizaveta Shashkova
87108bdc93 PyDev: Remove wrong else clause.
GitOrigin-RevId: 18e14b62ed35c687a5f65d308677d0cf6c1b0d87
2019-06-07 17:17:08 +03:00
Elizaveta Shashkova
9a216e8684 PyDev: When a thread is created, notify about it as soon as possible.
GitOrigin-RevId: 9bd2aecfe3de1dc2af9c4b4a545623c6016faf5a
2019-06-07 17:15:36 +03:00
Aleksey Rostovskiy
185284cee6 get rid of intellij.build.toolbox.litegen parameter and use BuildOptions.TOOLBOX_LITE_GEN_STEP to skip it instead
GitOrigin-RevId: 9aac8ee4ed1ebf2a29de18a238825fafb1ab88f9
2019-05-27 15:08:08 +03:00
Alexandr Suhinin
9215f4240b [duplicates] enable duplicates analysis in PyCharm/WebStorm/PhpStorm/RubyMine
GitOrigin-RevId: 1545b79fdca4888f4b94f47f22703fd37694fa7a
2019-05-27 15:07:30 +03:00
Anton Makeev
c105e26db3 Merge remote-tracking branch 'origin/master' into amakeev/gradle
GitOrigin-RevId: f9a633252daf311ecab19002c0f4757052eee9dc
2019-05-17 19:13:15 +03:00
Anton Makeev
b54aaf7e4e IDEA-210281 Cleanup Gradle settings: separate Runner configurable removed
GitOrigin-RevId: adbc39121fe91beb633e125b4cf39bfe0a422e4b
2019-05-17 19:02:16 +03:00
Andrey Lisin
3ed0ece29c PY-33148 Fix debugger hang when exec or spawn are called with bytes args
GitOrigin-RevId: 4aaa502a6745033c61e74fd1f32b25a18ef55fe7
2019-05-14 14:05:43 +03:00
Tagir Valeev
8f4ed82473 Merge remote-tracking branch 'origin/master'
GitOrigin-RevId: 4aa2198b0e40383875028553977a5721ba77766d
2019-04-23 13:19:45 +03:00
Andrey Lisin
407a4b0752 PY-24668 Fix debugging of Python subprocesses called with "-c" parameter 2019-04-11 14:18:08 +03:00
Alexander Koshevoy
d299da0394 PY-24191 Skip sending superfluous messages from debugger to IDE about substituting current process with non-Python ones 2018-11-19 20:09:12 +03:00
Alexander Koshevoy
899a7a037f PY-24191 Fix debugging Django applications with auto-reload in Docker containers
Python documentation states about `os.exec*()` functions: "These functions all execute a new program, replacing the current process." This also applies for `subprocess.Popen()` in Python 2.x because it initially uses `os.fork()` and then `os.exec*()` function call for the child process.

Previously we put `CMD_PROCESS_CREATED` message in the queue and performed the original `os.exec*()` function call immediately. In the most cases Python debugger did not have enough time to process `CMD_PROCESS_CREATED` message from the queue and it has not being sent to the IDE.

Now when `PyDB` works in server mode we also wait for the response from the IDE after sending `CMD_PROCESS_CREATED` message to be sure that the IDE received it. Waiting for the response in server mode is required because the current process might become substituted before it actually sends the message and IDE will not try to connect to `PyDB` in this case. Waiting of the response in client mode is not required because the substituted process will try to connect to the IDE itself.
2018-11-19 20:09:11 +03:00
Bernat Gabor
99df9e4259 PY-27594 Disable debug when Python gets input from stdin 2018-07-03 21:00:37 +03:00
Elizaveta Shashkova
e5109982e1 Fix debugging while new process creation with -c script arg (PY-28241)
Distinguish interpreter option and script arg
2018-04-03 12:41:24 +03:00
Elizaveta Shashkova
abfca5af46 Fix adding breakpoints during run by setting a dummy tracing function (PY-24026) 2017-06-06 18:51:50 +03:00
Elizaveta Shashkova
28bef58b9d Updates from PyDev.Debugger: refix attaching to subprocess with Popen on Windows (PY-20476, PY-22904) 2017-03-09 15:20:56 +03:00
Elizaveta Shashkova
adde01b0e2 Updates from PyDev.Debugger: revert changes for multiprocess debugging in Docker (PY-22978, PY-22904) 2017-03-09 15:20:55 +03:00
Elizaveta Shashkova
d6e8ff2e92 Updates from PyDev.Debugger: 1.0.0 release (PY-22904) 2017-03-09 15:20:47 +03:00
Elizaveta Shashkova
7f6b9f4874 Set frame evaluation function instead of tracing function if it's available 2017-01-31 20:51:37 +03:00
Alexander Koshevoy
41064a3696 PY-21264 Use send_process_created_message() in the original piece of code where it was extracted from 2016-11-10 14:25:04 +03:00
Alexander Koshevoy
3a0fd0f3ab PY-21352 Bug that None as the host argument value of pydevd.settrace() method has been passed as "None" string literal 2016-11-06 18:03:43 +03:00
Alexander Koshevoy
0d77411666 PY-21264 Debugger hanging after creating a new subprocess the other way than forking fixed
PROCESS_CREATED message is sent in all cases to IDE when new process is being created. ClientModeDebuggerTransport connection logic has been changed to fit into waitForConnect() method without scheduling reconnection tasks. Handshake message is used to check for connection with subprocess to be real one, not ephemeral. DebuggerTransport.messageReceived() has been abolished.
2016-11-06 18:03:42 +03:00
Alexander Koshevoy
7df98492e4 PY-17447 _notify_process_created() moved to PyDB as send_process_created_message() method 2016-10-18 18:42:40 +03:00