← 返回首页
java-buildpack/docs/framework-debug.md at main · cloudfoundry/java-buildpack · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Latest commit

 

History

History
41 lines (31 loc) · 2.02 KB
 main
Top

File metadata and controls

  • Preview
  • Code
  • Blame
41 lines (31 loc) · 2.02 KB

Debug Framework

The Debug Framework contributes Java debug configuration to the application at runtime. Note: This framework is only useful in Diego-based containers with SSH access enabled.

Detection Criterion enabled set in the config/debug.yml file
Tags debug=<port>
Tags are printed to standard output by the buildpack detect script

Configuration

For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to Configuration and Extension.

The framework can be configured by creating or modifying the config/debug.yml file in the buildpack fork.

Name Description
enabled Whether to enable Java debugging
port The port that the debug agent will listen on. Defaults to 8000.
suspend Whether to suspend execution until a debugger has attached. Note, you cannot ssh to a container until the container has decided the application is running. Therefore when enabling this setting you must also push the application using the parameter -u process which disables container health checking.

Creating SSH Tunnel

After starting an application with debugging enabled, an SSH tunnel must be created to the container. To create that SSH container, execute the following command:

$ cf ssh -N -T -L <LOCAL_PORT>:localhost:<REMOTE_PORT> <APPLICATION_NAME>

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 SSH tunnel has been created, your IDE should connect to localhost:<LOCAL_PORT> for debugging.

Footer

© 2026 GitHub, Inc.