Skip to content

feat: Automatically detect debug tasks#1149

Merged
CsCherrYY merged 1 commit intomainfrom
cs-fetch-debug-tasks
Jan 24, 2022
Merged

feat: Automatically detect debug tasks#1149
CsCherrYY merged 1 commit intomainfrom
cs-fetch-debug-tasks

Conversation

@CsCherrYY
Copy link
Collaborator

@CsCherrYY CsCherrYY commented Jan 13, 2022

part of #1088, more details can be found in that issue.

fix #394, #1118, supersede #398, #1138

autodebug

this PR changes:

  • Automatically detect debug tasks, supersede and deprecate setting gradle.javaDebug
    • Support to debug JavaExec and Test tasks
    • for clean cache configuration, use a new configuration gradle.javaDebug.cleanOutput instead
    • in proto file, add a new field debuggable in GradleTask, which contains the task type from custom Gradle model.
  • Rewrite document about debugging feature

@CsCherrYY CsCherrYY merged commit df18dec into main Jan 24, 2022
@CsCherrYY CsCherrYY deleted the cs-fetch-debug-tasks branch January 24, 2022 01:55
@CsCherrYY CsCherrYY mentioned this pull request Jan 24, 2022
@CsCherrYY
Copy link
Collaborator Author

verify steps:

  1. Download https://docs.gradle.org/current/samples/zips/sample_building_java_applications-groovy-dsl.zip
  2. In ./app/build.gradle, add the following snippet
task runApp(type: JavaExec) {
  classpath = sourceSets.main.runtimeClasspath
  mainClass = 'demo.App'
}
  1. In ./app/src/main/java/demo/App.java, add a breakpoint at line 12 (System.out.println(new App().getGreeting());)
  2. open Gradle projects view, find runApp task in app project, Tasks -> other -> runApp
  3. can see the debug button in the task, and click this button to successfully debug the task.

@Eskibear
Copy link
Member

verified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use custom model & plugin to get more detailed tasks info

2 participants