Remote debugging settings not working for Map/List visualization
Description: The debug settings for improving collection visualization (like showLogicalStructure and showToString) are not working in remote debugging mode, is working in local debug.
This is handled by https://github.com/microsoft/vscode-java-debug/ but it should work and definitely isn't evaluating correctly in the screenshot. What does your launch file look like ? One way I can simulate the behaviour of the logical structure not showing up is by failing to provide the projectName property.
I have already set the projectName property to 'starshieldsupport' in my launch.json:
{
"type": "java",
"name": "sandboxhendiaome",
"request": "attach",
"projectName": "starshieldsupport",
"hostName": "my remote ip",
"port": "5005"
}
However, the logical structure of collections still doesn't display correctly during remote debugging. Everything works fine with local debugging; this issue only occurs in remote debugging mode. I'm using macOS with Cursor IDE (based on VSCode).
Are there any other properties I need to configure to resolve this issue? Or could this be a known limitation in remote debugging mode?
I tested out with https://github.com/eclipse-jdtls/eclipse.jdt.ls/blob/main/.vscode/launch.json and the logic structure worked for me. Maybe I need to try with an actual remote machine but the protocol should be the same. Are you able to share your project ?
Sorry for the confusion. I've identified and resolved two basic issues on my end:
-
Project configuration error: My project is a Maven multi-module project, and I was incorrectly using the "name" attribute in my settings instead of the correct "artifactId" as the projectName in launch.json.
-
JDK version mismatch: My local debugging environment was using JDK 23 while the remote server was running JDK 21.0.2, causing the warning: "The debugger and the debuggee are running in different versions of JVMs."
After fixing both issues (specifying the correct artifactId as projectName and switching to a matching JDK 21), the Map and List visualization now works properly in remote debugging mode.
Thanks for your help in pointing me toward the projectName requirement, which led me to discover these configuration issues.