microsoft / vscode-spring-boot-dashboard

Spring Boot Dashboard for VS Code
https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-spring-boot-dashboard
Other
57 stars 31 forks source link

Live memory view keeps folding and unfolding #260

Open henryfung3a27 opened 1 year ago

henryfung3a27 commented 1 year ago

I was trying out the Spring Actuator live memory view feature and this happened.

Animation

It was the first time I added the Actuator package to the project.

I tried running the project by pressing "F5" (Start Debugging) and by pressing the "Run" icon on Spring Boot Dashboard. Both leading to the same result.


Property Value
Host OS Windows 10 (where the VSCode runs on)
Remote OS Ubuntu 20.04.4 (where the project lives)
VSCode 1.74.2
Java openjdk 18.0.2.1
spring-boot-starter-parent 2.7.7
Spring Boot Dashboard v0.9.0
Spring Boot Tools v1.42.0

I have checked out #245, not sure if it is related though.

Thanks.

Eskibear commented 1 year ago

It's strange. I cannot reproduce it, tried on below environments, with vscode 1.74.2.

Remote OS should be unrelated. Looks like the memory view (a webview) itself has something wrong. You can open console in developer tools (Help -> Toggle Developer Tools), see if there's any error related.

henryfung3a27 commented 1 year ago

There is this warning whenever I try to open the MEMORY live view:

DevTools failed to load source map: Could not load content for 
https://vscode-remote+ssh-002dremote-002b192-002e168-002e244-002e128.vscode-resource.vscode-cdn.net/home/vm/.vscode-server/extensions/vscjava.vscode-spring-boot-dashboard-0.9.0/node_modules/chartjs-adapter-moment/dist/chartjs-adapter-moment.min.js.map
Connection error: net::ERR_NAME_NOT_RESOLVED

Apparently it is trying to access a js from my remote PC file system. This js exists, but the hostname vscode-remote+ssh-002dremote-002b192-002e168-002e244-002e128.vscode-resource.vscode-cdn.net does not resolve to anything.

Perhaps this is where the problem is?

I am trying to install VSCode on the remote and see if this issue exist.

henryfung3a27 commented 1 year ago

Update:

It looks good when running on the remote directly with the same config.

However, the similar warning still persists with a different host name

DevTools failed to load source map: Could not load content for 
https://file+.vscode-resource.vscode-cdn.net/home/vm/.vscode/extensions/vscjava.vscode-spring-boot-dashboard-0.9.0/node_modules/chartjs-adapter-moment/dist/chartjs-adapter-moment.min.js.map
Connection error: net::ERR_NAME_NOT_RESOLVED

Actually I tried to go to this location from the browser and it does not resolve either.

Eskibear commented 1 year ago

The warning is not related to the issue. The host names are constructed and resolved by vscode itself, no worry. The *.js.map file (source mapping file, for debugging purpose) is not packed into chartjs-adapter-moment module which is used to render the chart.

henryfung3a27 commented 1 year ago

Not sure if it's related but my host has no access to the Internet, while the remote does. If the js is supposed to be downloaded on the host side (the VSCode side) instead of the project side, maybe that's a fail?

Eskibear commented 1 year ago

I'm not the author of this part though, I don't think there's anything related to networking. chartjs is pre-packed into the extension, it should work without Internet access. (I also tested locally without Internet, and it worked well).

I guess the culprit can be something related to either charjs itself or how we use it. It's a problem of rendering a web page. The behavior looks like the margin of the chart (or related element) is decreasing over time, and eventually has a negative value.

Eskibear commented 1 year ago

I managed to mimic similar behavior by decreasing height of the canvas, as below. Can you help to check that in developer console, see if the height is changing all the time? I bet something is changing it on your environment.

https://user-images.githubusercontent.com/2351748/209525515-9016a95e-5bd2-4c27-91c3-71b5be1fd01e.mov

henryfung3a27 commented 1 year ago

Yup. The height is constantly decreasing

height_decrease

henryfung3a27 commented 1 year ago

I bet something is changing it on your environment.

I tried

But still, the height is decreasing overtime

henryfung3a27 commented 1 year ago

I tried creating a Spring Boot project with the same configs on the Host side and the canvas height is still decreasing overtime.

heguro commented 10 months ago

I encountered the same issue when window.zoomLevel was set to -1 in the VSCode settings. When I set it to -0.9999999 or -1.01 this issue doesn't occur.

My environments: