79410359

Date: 2025-02-04 01:11:31
Score: 3
Natty:
Report link

Check this link from SAP Learning: https://learning.sap.com/learning-journeys/develop-advanced-extensions-with-sap-cloud-sdk/exercise-debugging-a-spring-boot-application-in-cloud-foundry_c2d2b14c-7652-42b8-8a88-531d5c42fdcc

Basically you must create or update your launch.json file with the following content:

{
"version": "0.2.0",
"configurations": [
    {
        "type": "java",
        "name": "Launch Application",
        "request": "launch",
        "mainClass": "com.example.demo.DemoApplication",
        "projectName": "demo"
    },
    {
        "type": "java",
        "name": "Attach Application",
        "request": "attach", 
        "hostName": "localhost",
        "port": 5005,
        "sourcePaths": [ "${workspaceFolder}" ] 
    } 
]

}

And then execute the follogin commands in terminal:

cf set-env my-spring-demo JBP_CONFIG_JAVA_OPTS "[java_opts: '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000']"
cf enable-ssh my-spring-demo
cf restage my-spring-demo
cf ssh -N -T -L 5005:localhost:8000 my-spring-demo
Reasons:
  • Blacklisted phrase (1): this link
  • RegEx Blacklisted phrase (1): Check this link
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: user24957535