Skip to content
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.
/ debug Public archive

A Cloud Native Buildpack that configures debugging for JVM applications

License

Notifications You must be signed in to change notification settings

paketo-buildpacks/debug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

gcr.io/paketo-buildpacks/debug

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.

Behavior

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

Configuration

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.

Publishing the Port

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.

Eclipse Configuration

License

This buildpack is released under version 2.0 of the Apache License.