Skip to content

Commit

Permalink
chore(build): add debug flag to orca build (#2020)
Browse files Browse the repository at this point in the history
Starting orca with ./gradlew -DDEBUG=true now causes the JVM to
listen on port 8183 for a remote debugger.
  • Loading branch information
ezimanyi authored Feb 28, 2018
1 parent 73566bf commit 18b2a30
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,13 @@ The tasks of a stage share a common context and can publish to a global context
For example a _bake_ stage publishes details of the image it creates which is then used by a _deploy_ stage.

Orca persists a running execution to Redis.

### Debugging

To start the JVM in debug mode, set the Java system property `DEBUG=true`:
```
./gradlew -DDEBUG=true
```

The JVM will then listen for a debugger to be attached on port 8183. The JVM will _not_ wait for the debugger
to be attached before starting Orca; the relevant JVM arguments can seen and be modified as needed in `build.gradle`.
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ allprojects {
}
}
}

tasks.withType(JavaExec) {
if (System.getProperty('DEBUG', 'false') == 'true') {
jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8183'
}
}
}
subprojects {
license {
Expand Down

0 comments on commit 18b2a30

Please sign in to comment.