When I try remote debugging on my mac it work without any problem but when I'm try it from on local vagrant box machine i got the following exception in the event log
Error running retailapp: Unable to open debugger port : java.io.IOException "handshake failed - connection prematurally closed"
i used the following command to run the jar on the local vagrant box
$ java -Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -jar myjar.jar
That is after i have made prot forwarding for the fort 5005 in the Vagrantfile
override.vm.network "forwarded_port", guest: 5005, host: 5005, protocol: 'tcp' # InteliJ Debugger
and used the following remote configuration on IntelliJ