개발자의 삶/기타

[VSCode] Failed to launch debuggee VM. Reason: com.sun.jdi.connect.VMStartException: VM did not connect within given time: 10000 ms

Kedric 2021. 4. 6. 23:11
728x90
반응형

Failed to launch debuggee VM. Reason: com.sun.jdi.connect.VMStartException: VM did not connect within given time: 10000 ms

 

결론부터 말하자면

host파일 문제였다.

터미널을 열고

sudo vi /private/etc/hosts

하고 127.0.0.1 localhost

가 정상적인지 확인한다.

 

 

다른분이 하시던 프로젝트를 받아 빌드하는데

 

디버그 모드로 빌드할 경우

 

자꾸 위와 같은 에러가 났다.

 

영문을 알 수 없어 검색해보았지만

 

jdk 버전때문이다.

java 버전떄문이다.

프로젝트마다 다르다.

설정에 따라 다르다.

등 많은 글들이 있었지만 해결되지 않았다.

 

github.com/microsoft/vscode-java-debug/issues/164#issuecomment-398294373

 

Unable to launch Java Project on Mac. Failed to launch debuggee VM. Reason: com.sun.jdi.connect.VMStartException: VM did not con

Unable to launch Java Project on Mac. Environment Operating System: Mac 10.13.1 JDK version: 8u152 Visual Studio Code version: 1.18.1 Java extension version: Langage 0.14.0 / Debug 0.3.0 Steps To R...

github.com

검색 하다 위 분의 말대로

launch.json 의

internalConsole 를 

integratedTerminal 로 바꾸고 빌드해보았는데

gethostbyname command of 'localhost' failed 라는 output 이 찍혔고

위 글대로 나 또한 host 파일이 문제였다.

 

이전 프로젝트 작업시에 

host 파일에 127.0.0.1 에 localhost가 아닌 다른 dns 를 저장하고 있었다.

 

해결법은 위 결론대로다.

728x90
반응형