-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: [vue/xstate-inspect] Impossible to inspect in iframe #3143
Comments
were you able to solve this issue? |
We are going to discuss changes to the app/inspector protocol~ to make use cases like this work out of the box. Stay tuned. |
The workaround right now is to add the iframe outside of Vue: <body>
<noscript>
<strong
>We're sorry but codesandbox doesn't work properly without JavaScript
enabled. Please enable it to continue.</strong
>
</noscript>
<div id="app"></div>
<iframe data-xstate></iframe>
<!-- built files will be auto injected -->
</body> |
No, I used the external window finally, but I had to do weird things to make it work. I had to destroy and reopen the window everytime we |
What did you came up with?
I saw news about stately sky. But it's not the same use case. I saw about those news too: I feel like debugging should be the n°1 priority as it is hard to understand what's happening in a state machine... |
Description
As discussed in the thread on the Stately discord, it is impossible to use the iframe to inspect the state machine with vue if the iframe is in a component and the machines are initialized in that component (or elsewhere).
Indeed, the documentation says that you should run
inspect()
before any other code, for vue, the best being inmain.js
. But if you do this in this order, you can't see the inspector in the iframe (white iframe).Expected result
(a) When you run inspect before any code with the iframe option, the iframe displays the inspector.
OR
(b) When
inspect()
is run after the component containing the iframe has been initialized, the iframe detects and displays the previously run machines.Actual result
(a) When you run inspect before any code with the iframe option, the iframe displays nothing. (white iframe)

OR
(b) When inspect is run after the component containing the iframe has been initialized, the inspector is launched but does not detect the machines that were previously launched. (Waiting for connection...)

Reproduction
sandbox (a)
sandbox (b)
Additional context
No response
The text was updated successfully, but these errors were encountered: