Commit Graph

315 Commits

Author SHA1 Message Date
Mikhail Pyltsin
bc7eb9f89f [java] IDEA-375134 Can't run non-static main method for Java 21 Preview
(cherry picked from commit f9d8a7a3b8b6f24ae8014ffb05b9b5b28ba9d3c0)


(cherry picked from commit f0966f81713bd81f4128c2a1c1fbd717dc394682)

IJ-MR-169535

GitOrigin-RevId: f9bfafb5e635f684d124d8fd4a7a5a996c6971e7
2025-08-04 12:58:50 +00:00
Maria Sokolova
03000b963a [debugger] Fixed NPE in Coroutines View
IDEA-374561


(cherry picked from commit 37474b08ca8a3c0751b36fa883756c1dbf8b94dc)

IJ-CR-167001

GitOrigin-RevId: 5b92085c4b025cd28b0c572ea79648b493c19cbc
2025-06-26 21:06:01 +00:00
Maria Sokolova
fbd38fbf3b [debugger] Compute last observed stack trace for coroutines in one evaluation with the dump.
* It's faster than computing coroutine stack trace for each coroutine separately.
* Coroutine dump will be evaluated together with stack traces even if the vm threads were resumed (by ThreadBlockedMonitor e.g.).
* lastObservedStackTrace is not a lazy property of DebugCoroutineInfo, so it's already computed on the library side when the dump is taken.

GitOrigin-RevId: 07c41bbe1e2682b431aedb6ffc70ba8331cf1765
2025-06-12 16:27:46 +00:00
Maria Sokolova
fd088c015e [debugger] Coroutine View: fixed coroutine job hierarchy.
Bugs: IDEA-371866, IDEA-366085

Only show the jobs corresponding to the coroutines captured in the dump.

GitOrigin-RevId: c163cdcdc9c4ba4d1e25a01daa940ff174af263b
2025-05-19 07:58:29 +00:00
Maria Sokolova
a3fc531e9f [debugger] Collect ALL continuations up to the CoroutineOwner for the top stack frame.
`CoroutinesDebugHelper#getCoroutineStackTraceDump` added a frame to the async stack trace only if the corresponding continuation was an instance of `kotlin.coroutines.BaseContinuationImpl`. But that's not always true, e.g. for `DispatchedContinuation` in case of `withContext`.

So, collect frames with `kotlin.coroutines.CoroutineStackFrame#callerFrame` and extract spilled variables if a continuation is an instance of `BaseContinuationImpl`

IDEA-370748

GitOrigin-RevId: 4a722eba06bbc6e893d9f4edba3ac773510c7ea0
2025-05-02 12:04:03 +00:00
Georgii Ustinov
29d4fc042d [Java. Tests. JUnit] Add integration test for correctly quoting args in args-file when running JUnit test in fork mode
IDEA-323007

GitOrigin-RevId: d692efccea439714324f7ea319f893d374fe069b
2025-05-01 13:21:40 +00:00
Egor Ushakov
bb8d5f99b6 IDEA-223372 Unable to see image if remote target is headless
GitOrigin-RevId: a5ea72b76bb12025ea25853737231828583b98c2
2025-04-28 16:17:31 +00:00
Georgii Ustinov
4ca91861f0 [Java. Tests. JUnit] Escape characters for child processes when arg-file shortening is present
#IDEA-323007 fixed

GitOrigin-RevId: f2c75dfb983873e6182f93b80749ad0dfc43be28
2025-04-23 19:02:50 +00:00
Egor Ushakov
d965580202 [debugger] do not wrap null result in helper
GitOrigin-RevId: 5c2b170084bdc3c857693f9eb2044b8485ecd3e6
2025-03-26 21:06:38 +00:00
Vladimir Parfinenko
e3a60db2aa [debugger] speed up gathering of virtual threads for thread dump, IDEA-367627, IDEA-367848
Evaluate everything in helper, no JDI requests for virtual threads

GitOrigin-RevId: d1f367e9def432554623189f673bd05759ec088b
2025-03-25 21:48:45 +00:00
Nikita Nazarov
f241ee62a1 [kotlin debugger] IDEA-357870 Reimplement evaluatable getters filtering using metadata helper
Previously, filtering of evaluatable getters in variables view relied on bytecode inspections. Because of this, in some cases incorrect getters were shown, and also filtering was disabled completely in Android Studio.

GitOrigin-RevId: 6b86d0307526c2ffa23cf49a14d579504bd5f810
2025-03-25 11:25:03 +00:00
Nikita Nazarov
35981ac398 [kotlin debugger] IDEA-357870 Refactor JsonUtils (debugger runtime)
GitOrigin-RevId: b79b2a0deeb9a43358e3574fbe929d9fe89b61d3
2025-03-25 11:25:03 +00:00
Nikita Nazarov
856194d31d [kotlin debugger] IDEA-357870 Introduce MetadataDebugHelper
Kotlin compiler stores meta information about every class in the `kotlin.Metadata` annotation. Unfortunately, there is no way to fetch this annotation using plain JDI interface, because unlike method information, class annotations are not exposed to the debugger. This commit adds a helper class that allows fetching `kotlin.Metadata` of a specific class as a JSON string.

GitOrigin-RevId: 4d463abcd21f75acf90a2358d5782ee1b8b524d2
2025-03-25 11:25:03 +00:00
Vladimir Krivosheev
f87922cf86 update bazel files
GitOrigin-RevId: 47fa457d01f09cf034eb1c41c81dc6dc7d2caf58
2025-03-12 04:03:10 +00:00
Anastasia Katsman
b4dd53e001 [rdct-tests] AT-1029 switch to dev server
[rdct-tests] make sure parameters are calculated only in the test process and fix test sync keymaps between thin clients
[rdct-tests] skip lobby related exceptions in case ApplicationManagerEx.isInIntegrationTest
[rdct-tests] add Product code to the CWM connection link so path are customised in FrontendProcessPathCustomizer and the collect logs test passes
[rdct-tests] fix Should be invoked in manager thread use DebuggerManagerThreadImpl for XSuspendContext.toString
[rdct-tests] add pre and post clean up options for all withServerAndClient variants
[rdct-tests] introduce a way to clean up dev server artifacts deleteArtifactsOfThisRun
eap installers test


Merge-request: IJ-MR-157158
Merged-by: Anastasia Katsman <Anastasia.Katsman@jetbrains.com>

GitOrigin-RevId: c05a79fb5eadb6665df4c2e657f866be9f96a078
2025-03-10 21:44:22 +00:00
Maria Sokolova
78427051ef [coroutines-debuuger] Fix CoroutinesDebugHelper#dumpCoroutinesInfoAsJsonAndReferences return null in case of an error
GitOrigin-RevId: d0a7ff5f6ea4932ca570044ec348aabd1bdb95d4
2025-02-17 22:04:36 +00:00
Maria Sokolova
53e920e5e7 [debugger] Introduced provider of Java virtual and platform threads.
Flag: `debugger.thread.dump.include.virtual.threads`

IDEA-355724

GitOrigin-RevId: 5c260df1d4cd2003b17ff8dd7692eec823faa3fb
2025-02-17 22:04:36 +00:00
Roman Shevchenko
7981844b65 [java] retiring 'breakgen' DLLs from JVM process proxy (IJPL-16521)
GitOrigin-RevId: 3789c7f569bc1f220aa9c7524d36ac44a3754cf0
2025-02-14 13:21:00 +00:00
Mikhail Pyltsin
add71cb7da [java-run] IDEA-367503 and IDEA-365965 hide gutters for java 22 and higher when it is impossible to create class
GitOrigin-RevId: be53750f3f70e70fde24181912887a36a874ab35
2025-02-13 20:06:20 +00:00
Egor Ushakov
8513706464 [debugger] do not leak results values in helper - do not create anonymous classes
GitOrigin-RevId: 798db72789f5517033023383160627e3cbf42890
2025-02-11 19:56:02 +00:00
Egor Ushakov
cb646fee57 [debugger] do not leak results values in helper - fixes for review
GitOrigin-RevId: d75d1b9f361c8382afe420779c69ea3e6fafbb8f
2025-02-11 18:05:57 +00:00
Egor Ushakov
58bd28151b [debugger] do not leak results values in helper
GitOrigin-RevId: 66073216977cc93dad14823761bbf1551cf1b990
2025-02-06 17:45:24 +00:00
Vladimir Krivosheev
0d7a3d6a26 update bazel files
GitOrigin-RevId: 0a24ce8e81d403fa978c7237a7fc193ec40cb0bc
2025-02-03 18:28:40 +00:00
Vladimir Krivosheev
b8245e1370 IJ-CR-146078 update bazel files
GitOrigin-RevId: 3bcfd10f71c84283bded464e142ead99edc6a278
2025-02-02 15:20:11 +00:00
Mikhail Pyltsin
f9bd873664 [java-run] IDEA-365965 Support JEP 495. Filter non-static methods in abstract classes
GitOrigin-RevId: e96732d810ae6a0f1ffa44a0d5cc11d4c0f50d06
2025-01-20 20:57:08 +00:00
Maria Sokolova
10472a2795 [coroutines-debugger] Fix the slow Coroutine View: obtain jobs and parents of coroutines with a Helper method.
Build the coroutine hierarchy in CoroutineView, from a job and the first parent of each coroutine.

IDEA-335303

GitOrigin-RevId: 7fe634a291364438229cfae7680894fba25b07c6
2025-01-16 11:51:05 +00:00
Egor Ushakov
1cabca9ffe [debugger] throw NoSuchMethodException if method not found in helper
GitOrigin-RevId: 5c2f800f6a51b5e53bb35412d2439969029583e3
2025-01-14 19:26:24 +00:00
Vladimir Krivosheev
0bc1cf1557 update bazel files
GitOrigin-RevId: 7320d3eff3aba093692ce66839c720ece6d7c4db
2024-12-30 11:28:24 +00:00
Vladimir Krivosheev
25233df1b1 cleanup - isEmpty
GitOrigin-RevId: 100d69abb6a423556574a72e82508fdb8f5d7fa3
2024-12-27 14:41:14 +00:00
Vladimir Krivosheev
98799639aa do not use _test as lib - test targets do not support this
GitOrigin-RevId: f2f49db4294b6a64040dbbd5f1d95e972cbd70a3
2024-12-15 18:32:30 +00:00
Egor Ushakov
700b9b8e6b [debugger] prevent the exception garbage collection in helper
GitOrigin-RevId: b85234a5a0d83ef25e04655abb65fb70664dcab9
2024-12-13 19:48:05 +00:00
Maksim Zuev
a5f063e9cf [debugger] EA-1583106 Explicitly load util class in case of debug attach
Fixes for IDEA-362750

GitOrigin-RevId: 4f6fc7eb45ea2e4beafdebdcf22973cb815c9977
2024-12-06 14:55:00 +00:00
Tagir Valeev
5dca817b05 Add missing @Override annotations
GitOrigin-RevId: 56b084f82d4f4ec5153645b4d745bc881b803a26
2024-11-29 12:51:16 +00:00
Vladimir Krivosheev
17916c90f8 libraries -> lib, resources, opt-in, test deps
GitOrigin-RevId: db66ee95dcb0f0553b40c9cc56cd6afed8634cdd
2024-11-27 13:53:42 +00:00
Egor Ushakov
4d28a3a308 [debugger] fixes for IJ-CR-149390
GitOrigin-RevId: 2276613d23ae0a19b5d730de5d1734d340c296e0
2024-11-25 19:05:01 +00:00
Maksim Zuev
083a9cbbd4 [coroutine debugger] IDEA-362750 Extract coroutine stacks with helper
GitOrigin-RevId: 049e579cbb771bb2f950ab030da59db9115716de
2024-11-25 17:00:46 +00:00
Vladimir Krivosheev
57a3174bf0 move resources to existing resources root
GitOrigin-RevId: 78997483cfe62983f667d27b6d03220e697cdb45
2024-11-23 08:09:44 +00:00
Egor Ushakov
1930f33628 [debugger] always wrap helper argument
GitOrigin-RevId: 24268ebe5dce4c04a6fce171ac58fa845d0fb973
2024-11-17 22:37:01 +00:00
Egor Ushakov
b535182d7b [debugger] fixing tests failing with helper
GitOrigin-RevId: d1eaaab9f1258688dfdd4c8c13c3193faaf36999
2024-11-15 20:17:25 +00:00
Egor Ushakov
9912aee5c9 IDEA-363183 Kotlin Debugger: CCE on creating map during evaluation
GitOrigin-RevId: 65d4660706f3808c8de92e6944fe58b57617e665
2024-11-14 18:48:18 +00:00
Egor Ushakov
0d3637c28f [debugger] fixing tests failing with helper
GitOrigin-RevId: 25de2bbd23c70e4a715aa58f473bd2f742345739
2024-11-14 18:48:18 +00:00
Egor Ushakov
b5816f2033 IDEA-363101 Kotlin Debugger: CCE on evaluating private function
GitOrigin-RevId: 98d05eb4f21fdd77bbbd6a98ac54eeb1d4dd72d2
2024-11-13 13:57:46 +00:00
Egor Ushakov
442ec9c204 [debugger] try to avoid arrays creation in batch evaluator
GitOrigin-RevId: 5f3a994c078248831e344005bffd8e4bbee8548c
2024-11-12 19:36:35 +00:00
Egor Ushakov
a8bcc8b7db [debugger] fallback to the direct evaluation if helper fails and report helper stack in the error message
GitOrigin-RevId: e8162cd8f310cf870b456abe2a76da043fe3b726
2024-11-11 20:12:57 +00:00
Vladimir Krivosheev
d0f2112207 bazel - use unique name to maven repository due to bazel issue (https://github.com/bazel-contrib/rules_jvm_external/issues/916)
GitOrigin-RevId: 1378657735b438684e934c8aca721d43980869c8
2024-11-09 11:06:41 +00:00
Andrzej Głuszak
cbca664f6c [bazel] Second attempt at generating tests
GitOrigin-RevId: 7763c9994b7c311310b83b98a542775feb00ed68
2024-11-09 11:06:41 +00:00
Egor Ushakov
1add664fa3 [debugger] try to avoid using arrays for arguments in helper
GitOrigin-RevId: da29532cf4ab5345a51860cae3d08f0bdf96c3df
2024-11-08 14:22:21 +00:00
Egor Ushakov
fbbc3e2e2f [debugger] fixed empty varargs array case in invocation helper
GitOrigin-RevId: a7a1942f7e3eaefed9e653b35d8b30dfc2fe8b24
2024-11-05 20:04:57 +00:00
Egor Ushakov
09d8f28ebf [debugger] use a spare args array element to avoid gc of the evaluation result
GitOrigin-RevId: 5c4e407769780b05a7028cfe3b4e3a40d2f42b05
2024-10-18 19:17:02 +00:00
Egor Ushakov
b177e49486 [debugger] merged method name and signature into one param in method invocation helper
GitOrigin-RevId: 250e3f9a9406dd0c7270133b953f3607a87c7f21
2024-10-15 21:14:31 +00:00