Skip to content

node --inspect sending ints as floats #7736

@nojvek

Description

@nojvek
  • Version: v7.0.0-nightly20160712ef1f7661c7
  • Platform: mac
  • Subsystem:

Here's what a typical start of a websocket session looks like

creating ws://localhost:9229/node
> {"id":1,"method":"Runtime.enable"}
> {"id":2,"method":"Debugger.enable"}
> {"id":3,"method":"Console.enable"}
> {"id":4,"method":"Profiler.enable"}
> {"id":5,"method":"HeapProfiler.enable"}
> {"id":6,"method":"Runtime.run"}
< {"method":"Runtime.executionContextCreated","params":{"context":{"id":1.000000,"isDefault":true,"origin":"","name":"NodeJS Main Context","frameId":""}}}
< {"id":1.000000,"result":{}}
< {"id":2.000000,"result":{}}
< {"error":{"code":-32601.000000,"message":"'Console.enable' wasn't found"},"id":3.000000}
< {"id":4.000000,"result":{}}
< {"id":5.000000,"result":{}}
< {"id":6.000000,"result":{}}
< {"method":"Debugger.scriptParsed","params":{"scriptId":"39","url":"bootstrap_node.js","startLine":0.000000,"startColumn":0.000000,"endLine":457.000000,"endColumn":0.000000,"executionContextId":1.000000,"hash":"D0A4F4210878862AC73FFB6658F7EC021A33D3F4","isContentScript":false,"isInternalScript":false,"isLiveEdit":false,"sourceMapURL":"","hasSourceURL":false,"deprecatedCommentWasUsed":false}}

Expected

  • Console.enable should not error since console is in the js_protocol.json domain
  • Response id's should be whole numbers not 1.0000. It doesn't break javascript but adds extra bytes on the websocket pipe when can be avoided. The other ids like startLine, endLine and executionContextId also have similar issues which can add up.

Chrome has the same problem so I'm guessing it needs to be fixed in v8 land.

/cc @pavelfeldman @ofrobots

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