Kotlin / kotlinx-kover

Apache License 2.0
1.37k stars 53 forks source link

A mistake in the guide "Connecting the JVM agent" #660

Closed Mike-Wazovsky closed 3 months ago

Mike-Wazovsky commented 3 months ago

I was reproducing the following guide: https://github.com/Kotlin/kotlinx-kover/blob/main/kover-jvm-agent/docs/index.md

Add an argument to the java application startup command -javaagent:=file:. Example of an application launch command java -jar application.jar -javaagent:/opt/kover-jvm-agent-0.8.3.jar=file:/tmp/agent.args.

Here is shown a wrong example. -javaagent parameter has to be stated before -jar.

So the example should possibly look like this: java -javaagent:/opt/kover-jvm-agent-0.8.3.jar=file:/tmp/agent.args -jar application.jar

In the variation presented in the guide, the agent does not connect and does not warn the user about it

shanshin commented 3 months ago

Indeed, my bad

shanshin commented 3 months ago

Thanks!