eclipse-jdt / eclipse-jdt/eclipse.jdt.debug

Set -XX:+EnableDynamicAgentLoading vm arg by default when launching?

Open
#622 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
23
Forks
68
Avg merge
1d 1h
Merged PRs (30d)
16

Description

When launching a JUnit test that uses Mockito and its inline mock maker, it currently prints the following warning to stderr:

```
Mockito is currently self-attaching to enable the inline-mock-maker. This will no longer work in future releases of the JDK. Please add Mockito as an agent to your build as described in Mockito's documentation: https://javadoc.io/doc/org.mockito/mockito-core/latest/org/mockito/Mockito.html#0.3
WARNING: A Java agent has been loaded dynamically (C:\\net.bytebuddy.byte-buddy-agent_1.17.1.jar)
WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning
WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information
WARNING: Dynamic loading of agents will be disallowed by default in a future release
```

Should JDT set the `-XX:+EnableDynamicAgentLoading` flag by default?
Maybe similar to the `-XX:+ShowCodeDetailsInExceptionMessages` flag?

![Image](https://github.com/user-attachments/assets/29ddcdcf-2c94-4635-8bf9-ef845f909b82)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.