Skip to content

Not able to attach debugger to a java gradle process #300

@shubham-dogra-s1

Description

@shubham-dogra-s1

I am using pre_debug_task to start a gradle process and want to attach debugger to this. But from logs it looks like it is waiting for pre-debug-task to be completed.

configuration

{
	"folders":
	[
		{
			"path": ".",
		}
	],
	"debugger_configurations":
	[	
		{
			"type": "java",
			"name": "Debug Gateway",
			"request": "attach",
			"hostName": "localhost",
            "port": 5005,
            "mainClass": "com.shubham.dogra.Gateway",
    		"projectName": "gateway",
            "pre_debug_task": "run_gateway"
		},
	],
	"debugger_tasks": 
	[	
		{
			"name" : "run_gateway",
			"shell_cmd": "./gradlew bootRun -p gateway --debug-jvm",
        	"working_dir": "${folder}",
      		"file_regex": "^.*Listening for transport dt_socket at address: 5005.*$",
		}
	]
}
Image

From logs it looks like debugger is waiting for pre_debug_task to be completed and then it will run the attach process. Is there any way we can attach degugger right way when pre_debug_task is running without errors?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions