Hello,
I am running my spring boot application in a docker container on graalvm-ce-19.0.0 image. I gave -Dpolyglot.inspect=9229 option to java command in entrypoint and published port 9229 as well. When I open chrome-devtools://devtools/bundled/js_app.html?ws=127.0.0.1:9229/237b6cc8-e3a3f607de68 it says "Debugging connection was closed. Reason: Websocket disconnected". How can I solve this?
Hi @hugsyy,
Is it possible to debug Java applications? From the documentation seems it is only possible for guest languages: "GraalVM supports debugging of guest language applications". Where guest languages are described as "guest programming languages, namely JavaScript, Ruby, R, Python and LLVM bitcode".
Anyway, I am having same issue for a NodeJS app within a docker container.
Thanks
Hi @sapetti I am not trying to debug java. I am trying to debug JavaScript guest language of polyglot java application. And it is working, it gives me the devtools URL when I run the JavaScript code. It just doesn't connect. Probably, it has something to do with ip or port.
Hi, I have the same issue.
I have a Java Web Application running on Tomcat and I'm able to debug it, when running locally. Once I put the application inside Docker container and try to connect the Chrome Dev Tools I got the exact same message: Debugging connection was closed. Reason: Websocket disconnected
@hugsyy Did you found a way to workaround this issue?
Hi all,
I've found a way how to workaround this issue, just set the inspect option to 0.0.0.0:<YourPortNumber>, when running in Docker environment. Also you have to set inspect.Secure=false or you have to provide inspect.KeyStore=....
https://www.graalvm.org/docs/tools/chrome-debugger
Here is how we solved this issue in Eclipse Dirigible: https://github.com/eclipse/dirigible/issues/567
Most helpful comment
Hi @sapetti I am not trying to debug java. I am trying to debug JavaScript guest language of polyglot java application. And it is working, it gives me the devtools URL when I run the JavaScript code. It just doesn't connect. Probably, it has something to do with ip or port.