Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Ever wanted to fully control/program the debugging process? Now you can using this module to connect and talk to the V8 debugger underyling your running NodeJS code!
To see the protocol check out: [http://code.google.com/p/v8/wiki/DebuggerProtocol]
Start your program like this:
% node --debug-brk MyScript.js
In another window run a script like this:
var pDebug = require('./index.js').pDebug
, debug = new pDebug({ eventHandler: function(event) { console.log('Event'); console.log(event); } })
;
debug.connect(function() {
var msg = { command: 'continue' };
debug.send(msg, function(req, resp) {
console.log('REQ: ');
console.log(req);
console.log('RES: ');
console.log(resp);
});
});
Looking at the V8 Debugger protocol above you can interact with the V8 debugger progammatically, just create message Ojbects that look just like what is documented on the V8 Debugger page and send them off & your callback will get executed when V8 responds.
You can/should also provide an 'eventHandler' to the construtor to handle events that tend to pop up - like 'afterCompile' and breakpoints.
Your NodeJS process running remotely? No problem!
new pDebug({host: 'some.other.host'});
Your NodeJS process running on some other port? No problem!
% node --debug-brk=9999 MyScript.js
new pDebug({port: 9999});
Accepts an optional object containing host (default: 'localhost'), port (default 5858), eventHandler function callback.
The eventHandler callback will get called with one paramter - the event received.
When you are ready to connect to a NodeJS/V8 debugger instance, call this.
One paramter is a function callback to be exercised after the connection is established - now you can start sending/receiving messages
Send a request to the V8 debugger. The various messages (and their responses) and their paramters are documented in that first link above.
Accepts up to 3 paramters:
object: This is the request object and is required. pDebug will handle sequence numbers for you so do not worry about that
callback: This function will get called back with the V8 response. The paramter list for this function is (request, response) where 'request' is your original request and 'response' is the V8 response. 'this' for this callback can optionally be set by the next paramter, otherwise 'this' is the pDebug object.
thisp: An optional object paramter, if provided 'this' in your response callback will be thisp, otherwise 'this' in the callback is your pDebug object.
Disconnect from the V8 debugger
FAQs
Programmable pure Javascript bindings for the V8 Debugger
We found that pDebug demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.