mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
Enable the v8 debug agent from ruby.
This commit is contained in:
parent
bfb9e9e33a
commit
70a0d43045
5 changed files with 28 additions and 1 deletions
|
@ -2,8 +2,10 @@
|
|||
|
||||
## Edge
|
||||
|
||||
* expose the V8 debugger via V8::C::Debug::EnableAgent()
|
||||
* force UTf-8 encoding on strings returned from javascript in ruby 1.9
|
||||
* remove deprecated evaluate() methods
|
||||
* make the currently executing JavaScript stack available via Context#stack
|
||||
|
||||
## 0.8.1 - 2011/03/07
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "v8_external.h"
|
||||
#include "v8_exception.h"
|
||||
#include "v8_locker.h"
|
||||
#include "v8_debug.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -37,5 +38,6 @@ extern "C" {
|
|||
rr_init_v8_external();
|
||||
rr_init_v8_exception();
|
||||
rr_init_v8_locker();
|
||||
rr_init_v8_debug();
|
||||
}
|
||||
}
|
||||
|
|
17
ext/v8/v8_debug.cpp
Normal file
17
ext/v8/v8_debug.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include "rr.h"
|
||||
#include "v8_debug.h"
|
||||
#include "v8-debug.h"
|
||||
|
||||
using namespace v8;
|
||||
|
||||
namespace {
|
||||
|
||||
VALUE EnableAgent(VALUE self, VALUE application_name, VALUE port) {
|
||||
return rr_v82rb(v8::Debug::EnableAgent(RSTRING_PTR(application_name), NUM2INT(port), false));
|
||||
}
|
||||
}
|
||||
|
||||
void rr_init_v8_debug() {
|
||||
VALUE DebugModule = rr_define_module("Debug");
|
||||
rr_define_singleton_method(DebugModule, "EnableAgent", EnableAgent, 2);
|
||||
}
|
6
ext/v8/v8_debug.h
Normal file
6
ext/v8/v8_debug.h
Normal file
|
@ -0,0 +1,6 @@
|
|||
#ifndef _RR_V8_DEBUG_
|
||||
#define _RR_V8_DEBUG_
|
||||
|
||||
void rr_init_v8_debug();
|
||||
|
||||
#endif
|
|
@ -1 +1 @@
|
|||
Subproject commit 7914da03e60cde3cde9d0aba83d36ddd49fe8b28
|
||||
Subproject commit dd93fd3e6a49d194a7788a143a336d2e94dd9532
|
Loading…
Add table
Add a link
Reference in a new issue