Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Can't get remote debugger to connect #39

Open
mvanveen82 opened this issue May 5, 2017 · 2 comments
Open

Can't get remote debugger to connect #39

mvanveen82 opened this issue May 5, 2017 · 2 comments
Labels

Comments

@mvanveen82
Copy link

mvanveen82 commented May 5, 2017

Hi,

I have a springboot java backend to which I'm trying to connect with the debugger. When starting the debugger the debugger controls appear at the top of the screen but only the stop en retry buttons are active. And the nightrider style loader under de debug configuration keeps flashing. So it seems it tries to connect but can't. However I get no error. Also the console of the springboot app show nothing. Only when stopping the debugger it reprints "Listening for transport dt_socket at address: 5005"

setting in pom.xml for debugging

<plugin>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-maven-plugin</artifactId>
        <version>${project.parent.version}</version>
        <dependencies>
             <dependency>
                 <groupId>org.springframework</groupId>
                 <artifactId>springloaded</artifactId>
                  <version>1.2.6.RELEASE</version>
             </dependency>
        </dependencies>
	<configuration>
           <jvmArguments>
	     -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
	   </jvmArguments>
	</configuration>
</plugin>

task (tasks.json) with which I launch the springboot app:

{
	"version": "0.1.0",
	"command": "mvn",
	"isShellCommand": true,
	"showOutput": "silent",
	"args": [
	],
	"tasks": [
		{
			"taskName": "Spring Boot Run",
			"suppressTaskName": true,
			"args": [
				"spring-boot:run"
			],
			"showOutput": "always"
		}
	]
}

Lauch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Java remote debugging",
            "type": "java",
            "request": "attach",
            "remoteHost": "localhost",
            "remotePort": 5005,
            "cwd": "${workspaceRoot}",
            "jdkPath": "/usr/local/var/jenv/shims",
            "startupClass": "${workspaceRoot}/target/classes/nl/bereslim/BsmBackendApplication",
            "options": [
                "-classpath",
                "${workspaceRoot}"
            ]
        }
    ]
}
@faustinoaq
Copy link
Contributor

I think you need to change your "startupClass" and add "sourcepath". You can try to hack your launch configuration since it extension still lacks of some documentation.

@dueckminor
Copy link

Hmm, seems to be same problem as #56 I've seen the same effect while trying to attach to a multithreaded local process.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants