# Kapt gradle debugging annotation processor

**URL:** <https://discuss.kotlinlang.org/t/kapt-gradle-debugging-annotation-processor/16210>\
**Category:** Uncategorized\
**Created:** [February 4, 2020, 3:53pm UTC](https://discuss.kotlinlang.org/t/kapt-gradle-debugging-annotation-processor/16210 "2020-02-04T15:53:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![walker622](https://avatars.discourse-cdn.com/v4/letter/w/5e9695/32.png) [@walker622](https://discuss.kotlinlang.org/u/walker622)\
**Post date:** [February 4, 2020, 3:53pm UTC](https://discuss.kotlinlang.org/t/kapt-gradle-debugging-annotation-processor/16210/1 "2020-02-04T15:53:31Z")

</div>

Hello. I have a problem with debugging an annotation processor. I googled a lot about “How to debug kapt” etc and only this [topic](https://discuss.kotlinlang.org/t/debug-annotation-processor-kapt/11369) with his last comment helped to enable my debug breakpoints.

My problem is that I have to reconnect my remote debugger each time when the gradle stops. The first time he stops when `> Starting Daemon`, it is okay because by default `-Dorg.gradle.debug=true` starts with `suspend=y` option. However, next time he stops on `:mymodule:compileKotlin` task and here I have to reattach my remote debugger. Does anyone occur the same problem?

Here are my settings:

Gradle plugin version inside the main **build.gradle:**

```
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61'

```

**gradle.properties**

```
kapt.incremental.apt=true            
kapt.use.worker.api=true            
kapt.include.compile.classpath=false

```

the command that I run:

`gradle clean build -Dkotlin.compiler.execution.strategy="in-process" -Dorg.gradle.debug=true --no-daemon`

Also If I remove `-Dkotlin.compiler.execution.strategy="in-process"` it won’t work.
