microsoft / vscode-remote-try-java

Java sample project for trying out Dev Containers
https://aka.ms/vscode-remote/containers/getting-started
MIT License
301 stars 433 forks source link

Debugger not working #21

Open kchojhu opened 3 years ago

kchojhu commented 3 years ago

Hi! I was able to run the Java code perfectly. When I try to run by clicking on 'Debug' then I get an error

''void org.eclipse.jdi.internal.connect.ConnectorImpl$StringArgumentImpl.(org.eclipse.jdi.i... java.lang.String,java.lang.String, java.lang.String, boolean)'

Could someone help how I can fix this or how I can enable debugger? Thanks!

kchojhu commented 3 years ago

Figured out the issue. Main reason is that Java plugins (Including Java Debugger) require 'reload' to work. So when installing plugins from remote initially would not work. After I followed these steps to persist the plugins on the host then debugger worked!

https://code.visualstudio.com/docs/remote/containers-advanced#_avoiding-extension-reinstalls-on-container-rebuild