#Connect machines to Inspector
1 messages · Page 1 of 1 (latest)
Do I need to be using a different URL for the Inspector window?
// Open the inspector in a new window
const inspectorWindow = window.open(
"https://stately.ai/registry/editor/embed?inspect",
"XStateInspector",
"width=1200,height=800,menubar=no,toolbar=no,location=no,status=no"
);
Are you using the inspector? https://stately.ai/docs/inspector
@opaque urchin thanks for confirming. Yes, this is the tool that we're attempting to use. No doubt, we've missed something obvious. In this file, we launch the Inspector tool. Separately, we instrument the machines with Inspector, so live events can be seen in the Inspector browser.
Related to this question, here's a quick docs fix in case its of help - https://github.com/statelyai/docs/pull/480
I wonder where we're going wrong in our attempted use of the Inspector.
Does anyone see anything obvious that we're doing wrong (in the React snippet above)?
If we don't crack this one today, we'll toss in the towel on Inspector.
@meager socket @opaque urchin pointers, appreciated.
I don't think you can open the window manually, you have to enable auto start or call .start(), which registers the communication handlers and updates the status.
Thank you, @wintry thistle. As another test, I set aside the code above entirely and have made three lines changes to an existing actor based on the example in the inspector readme.md. While the Inspector popup window opens, it unfortunately, freezes my both tabs of my browser: my app and the inspector window never loads - as if the browser's event loop is frozen.
The inspector popup window opens to https://stately.ai/inspect, never loading the page.
It's worth noting that some components of my app, including Xstate actors are dynamically loaded via remote-component. As a library xstate is packaged in both the base level app and in the remotely loaded components.
Sorry, I'm not familiar with remote-component 😕 Maybe someone else can help you with that
@opaque urchin a final ping before I toss in the towel...
Let me take a look today