Skip to content

v8 inspector - Runtime.evaluate doesn't work without a contextId #8426

@roblourens

Description

@roblourens

Writing a client against the new v8 inspector debug protocol, and Node's behavior doesn't match the spec, but this does work in Chrome. Not sure if it should go here or V8.

According to this - https://chromedevtools.github.io/debugger-protocol-viewer/v8/Runtime/#method-evaluate - 'contextID' is optional, and should evaluate in the global context if not present. But if I don't include it, I get the error "Cannot find default execution context".

Request: {"id":4,"method":"Runtime.evaluate","params":{"expression":"123"}}
Response: {"error":{"code":-32000,"message":"Cannot find default execution context"},"id":4}

I'm on OSX, and see this on 6.4.0 and the latest v7 nightly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    inspectorIssues and PRs related to the V8 inspector protocol

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions