fix(plugins): ask before loading a changed Java agent (#4003)

When a plugin's Java agent jar changed, the host already refused to load it until java.agent was granted again, but Settings still showed the permission as granted, so the agent silently disappeared from Run/Debug. PluginInfo now carries the agent's file name, arguments and whether its jar still matches the approved hash; Settings › Plugins warns about a changed jar and offers Approve new jar, which grants the permission again.

Co-authored-by: NeverKnowsTomorrow <36879844+NeverKnowsTomorrow@users.noreply.github.com>
This commit is contained in:
Q
2026-11-17 21:20:40 +08:00
committed by GitHub
co-authored by NeverKnowsTomorrow
parent 39f709def5
commit a83bad107c
11 changed files with 137 additions and 11 deletions
+4 -2
View File
@@ -2217,8 +2217,10 @@ args = "optional-arguments" # optional
`[capabilities]` (a manifest that lists it is refused). On grant the IDE
records the jar's content hash and checks it again before every launch; a
changed jar is left out, with a line in the console, until the user approves
`java.agent` again in Settings › Plugins, which shows the agent's file name
and arguments next to the permission. Refusing or revoking it keeps the rest
`java.agent` again in Settings › Plugins. Settings shows the agent's file name
and arguments next to the permission, and when the jar no longer matches the
approved hash it shows the reason and an **Approve new jar** action. Refusing
or revoking it keeps the rest
of the plugin working, and the next launch has no agent.
- The IDE adds one `-javaagent:<absolute path>[=<args>]` argument to the Java
command line of **Application**, **Spring Boot** and **JAR Application**