java - 如何在Gradle中启用Java代理调试?

标签 java gradle javaagents

If you still don’t understand why there are uninstrumented calls or methods, you can also turn on the instrumentation traces, as well as additional checks, by adding respectively the v, d and c arguments to the Java agent (the corresponding AOT instrumentation task options are verbose, debug and check respectively). This will print thoroughly all the steps of Quasar’s instrumentation process, including which methods calls are considered suspendable (or aren’t, and why) and which are actually instrumented (or aren’t, and why).



Reference

我在build.gradle中有以下一行:
tasks.withType(JavaExec)
        {
            jvmArgs "-javaagent:${configurations.quasar.iterator().next()}"
        }

如何将参数传递给Java Agent?我尝试了一些方法,但没有任何效果。

最佳答案

在最后添加:

tasks.withType(JavaExec)
{
    jvmArgs "-javaagent:${configurations.quasar.iterator().next()}=vdc"
}

关于java - 如何在Gradle中启用Java代理调试?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40551133/

相关文章:

java - 算法 : Hybrid MergeSort and InsertionSort Execution Time

android - 离线 Maven 仓库中缺少 Gradle 插件

gradle - Gradle-为特定项目设置特定的JAVA_HOME

playframework - 是否可以使用javaagent运行Play Framework 2.0服务器?

java - NetBeans 应命名为 "Mexican Jumping Beans"

java - 使用 Spring Data Redis 连接到多个 Redis 服务器

java - 如何设置每秒重复计数?

android - 添加以在 afterEvaluate 中构建变体源集

java 代理 检测类文件未反射(reflect)在 PCF 上

tomcat9 - Tomcat 服务未使用弹性 APM java 代理启动