Chrome remote debugging Basic Authentication

How can I do a basic authentication via chrome remote debugging?

That is I have a chrome running in remote debug like this

chrome.exe –remote-debugging-port=9222

then I use WebSocket4Net to comunicate with chrome. I would like to automate the basic authentication, by passing user and password in the json. I know that I could do simply

https://username:[email protected]/

but I would like also to try to pass them in the json.

I also have another question related to this.. Is it possible to pass in the json a javascript expression to evaluate? I have a javascript function to evaluate in order to get an id in a webpage

var children = document.body.getElementsByTagName('*');
var id='userScreenName';
var elements = [], child;
for (var i = 0, length = children.length; i < length; i++) {
   child = children[i];
   if (child.id.indexOf(id)>-1)
       elements.push(child);
};
return elements[0].id;