From 50ca99832ea4a5fc30a488ad33958743482335db Mon Sep 17 00:00:00 2001 From: Juraj Michalek Date: Mon, 23 Jun 2014 22:13:47 +0200 Subject: [PATCH] information about debugging gradle --- 16-debug-gradle-script/build.gradle | 16 ++++++++++++++++ README.md | 15 +++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 16-debug-gradle-script/build.gradle diff --git a/16-debug-gradle-script/build.gradle b/16-debug-gradle-script/build.gradle new file mode 100644 index 0000000..ddb6e5f --- /dev/null +++ b/16-debug-gradle-script/build.gradle @@ -0,0 +1,16 @@ +class Brno { + def stopMe() { + def message = "Good place for break point." + println message + } +} + +task hello { + doLast { + println "You can't stop me here!" + def city = new Brno() + city.stopMe() + } +} + + diff --git a/README.md b/README.md index 5415d6f..dcaa39e 100644 --- a/README.md +++ b/README.md @@ -163,3 +163,18 @@ Plugin is just counting lines in build.gradle file in current directory. gradle tasks gradle countLines + +## 16-debug-gradle-script + +Do not run in daemon mode. +Set environment variable GRADLE_OPTS to + + "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005" + +Start gradle task + + gradle hello + +Attach remote debugger from Ide. + +More information: http://georgik.sinusgear.com/2014/06/23/how-to-debug-gradle-script/