inspect icon indicating copy to clipboard operation
inspect copied to clipboard

Visual Studio Code Extension Development, inspector produces 'Window does not exist; inspector cannot be started.'

Open BillHertzing opened this issue 1 year ago • 4 comments

statelyai/inspect produces the message "Window does not exist; inspector cannot be started.'

const primaryMachineInspector = createBrowserInspector(); // This line produces the errorMessage

I am developing a Visual Studio Code Extension, xState is running in a VSC Development Host.

package.json: (// relevant entries) "dependencies": { "@statelyai/inspect": "^0.2.0", "bufferutil": "^4.0.8", "utf-8-validate": "^6.0.3", "xstate": "^5.5.1"

Also, after installing inspect, WebPack reported two missing packages bufferutil and utf-8-validate. I installed those manually, but it did not resolve the problem.

VSC Version : image

Windows Version: image

Please let me know if I can supply any additional information. I'm also on the Discord Stately server as BaslimOfJubbul

BillHertzing avatar Jan 19 '24 02:01 BillHertzing

Windows version info: Windows and computer details

BillHertzing avatar Jan 19 '24 02:01 BillHertzing

bufferutil and utf-8-validate

Strange; Stately Inspect does not depend on these.

You should be able to pass in a custom window object here:

const inspector = createBrowserInspector({
  window: /* custom window object */
})

Maybe that may help? We currently assume a normal browser environment, and haven't yet tested within VS Code extensions.

davidkpiano avatar Jan 19 '24 05:01 davidkpiano

I will test this tonight.

On Thu, Jan 18, 2024 at 10:19 PM David Khourshid @.***> wrote:

bufferutil and utf-8-validate

Strange; Stately Inspect does not depend on these.

You should be able to pass in a custom window object here:

const inspector = createBrowserInspector({ window: /* custom window object */})

Maybe that may help? We currently assume a normal browser environment, and haven't yet tested within VS Code extensions.

— Reply to this email directly, view it on GitHub https://github.com/statelyai/inspect/issues/4#issuecomment-1899786405, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG2NNFGRD6ZNR6CGC2Y4STYPH64VAVCNFSM6AAAAABCBHVJMKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJZG44DMNBQGU . You are receiving this because you authored the thread.Message ID: @.***>

BillHertzing avatar Jan 19 '24 18:01 BillHertzing

could you please point me in the direction of where I can find a definition of and instructions forhow to implement a /* custom window object */? I'm unfamiliar with the term., but willing to do the research and see if I can get it working. Hoping you can get me started in a direction more specific than 'just google it' :-)

On Fri, Jan 19, 2024 at 11:34 AM Bill Hertzing @.***> wrote:

I will test this tonight.

On Thu, Jan 18, 2024 at 10:19 PM David Khourshid @.***> wrote:

bufferutil and utf-8-validate

Strange; Stately Inspect does not depend on these.

You should be able to pass in a custom window object here:

const inspector = createBrowserInspector({ window: /* custom window object */})

Maybe that may help? We currently assume a normal browser environment, and haven't yet tested within VS Code extensions.

— Reply to this email directly, view it on GitHub https://github.com/statelyai/inspect/issues/4#issuecomment-1899786405, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG2NNFGRD6ZNR6CGC2Y4STYPH64VAVCNFSM6AAAAABCBHVJMKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJZG44DMNBQGU . You are receiving this because you authored the thread.Message ID: @.***>

BillHertzing avatar Jan 19 '24 18:01 BillHertzing