Cannot debug Android Gradle project

Answered

Hello,

i cannot get an android gradle project to hit any breakpoints on desktop.

The project is generated with the libgdx setup app (https://libgdx.badlogicgames.com/download.html).
The Project can be generated with an android project or without one. If i generate a project without android (desktop only) debugging works as expected. If i generate a project with desktop and android the debugging of the desktop app doesn't work. 

I uploaded the projects to reproduce the issue:

without Android, debugging works: https://github.com/Vegita2/gdxDebugTest
with Android, debugging does not work: https://github.com/Vegita2/gdxDebugTestAndroid

Steps to reproduce

  1. Open project by opening the file "build.gradle"
  2. Create a new gradle run configuration where Gradle project is "desktop" and Tasks is "run"
  3. add breakpoints anywhere in the code and start debugging
  4. If the android project is used, the execution doesn't stop at the breakpoints. With the other project debugging works

How can i get the project with android to also hit breakpoints when running on desktop? I am using Intellij Ultimate 2019.3.2

0
5 comments

Please try debugging using IntelliJ IDEA instead of Gradle by switching the build/run actions to IntelliJ IDEA: https://i.imgur.com/HpeUaUE.png .

0

Both of these options are already set to IntelliJ IDEA. Changing the options doesn't make a difference

0

The issue is not reproducible with IntelliJ IDEA build/run option and Application run/debug configuration:

0

Thank you for details. Please vote and follow this issue for updates: https://youtrack.jetbrains.com/issue/IDEA-228415 I hope it will be fixed soon.

0

Debugging indeed works when using the Application run/debug configuration. The problem is when using the gradle task

I know it should work, because the last time i tried it (November 2019) i could debug the gradle run configuration. Also it is possible to debug the project without android which should be the same when running the desktop version

0

Please sign in to leave a comment.