This buildpack will soon be archived, remote debugging functionality is now available at build time by default and can be enabled with the runtime variable $BPL_DEBUG_ENABLED
. See here for more information.
The Paketo Debug Buildpack is a Cloud Native Buildpack that configures debugging for JVM applications.
This buildpack will participate if all the following conditions are met
$BP_DEBUG_ENABLED
is set
The buildpack will do the following:
- Contribute debug configuration to
$JAVA_TOOL_OPTIONS
Environment Variable | Description |
---|---|
$BP_DEBUG_ENABLED |
Whether to contribute debug support |
$BPL_DEBUG_ENABLED |
Whether to enable debug support |
$BPL_DEBUG_PORT |
What port the debug agent will listen on. Defaults to 8000 . |
$BPL_DEBUG_SUSPEND |
Whether the JVM will suspend execution until a debugger has attached. Defaults to n . |
When starting an application with debugging enabled, a port must be published. To publish the port in Docker, use the following command:
$ docker run --publish <LOCAL_PORT>:<REMOTE_PORT> --env BPL_DEBUG_ENABLED=true ...
The REMOTE_PORT
should match the port
configuration for the application (8000
by default). The LOCAL_PORT
can be any open port on your computer, but typically matches the REMOTE_PORT
where possible.
Once the port has been published, your IDE should connect to localhost:<LOCAL_PORT>
for debugging.
This buildpack is released under version 2.0 of the Apache License.