c4milo / node-webkit-agent

NodeJS agent for WebKit devtools front-end
http://c4milo.github.io/node-webkit-agent/
1.09k stars 78 forks source link

global.data #69

Open marcominetti opened 10 years ago

marcominetti commented 10 years ago

Hi, I was looking at global objects and I've found the global.data object.

{"method":"Runtime.evaluate","params":{"expression":"JSON.stringify(global.data)","objectGroup":"console","includeCommandLineAPI":true,"doNotPauseOnExceptionsAndMuteConsole":false,"returnByValue":false,"generatePreview":true},"id":82}

I suppose it is node-webkit-agent specific. Can't it be kept private?

I have no time now to clean it, but I recommend not to use globals if not strictly necessary.

Do you agree?

c4milo commented 10 years ago

It is part of the console agent I believe. That is the message the front-end sends to the agent in order to evaluate variables in Node side. Although, I'm not sure it currently works since the debugger agent is not complete.