Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why "Scenic View" can inspect another JavaFX application?

Tags:

javafx

I started a JavaFX application, and then start the ScenicView in another process. The magic happens:

ScenicView can find the nodes and properties of each node of my JavaFX application! When I clicked on a node displayed on ScenicView, it even makes the corresponding area of my JavaFx application yellow!

How can "Scenic View" do that? I don't change any start settings, and they are in two standalone jvms!

like image 774
Freewind Avatar asked May 11 '14 13:05

Freewind


1 Answers

You can do this by attaching a debugger to the running JVM. It's basically the same thing that VisualVM does to profile your programs, attach debugger, profile and then, in the case of "Scenic View" list all objects and add an overlay at the position of the element.

like image 108
michaeln Avatar answered Sep 28 '22 05:09

michaeln