Ok. I figured out that if *v8::IndexedPropertyHandlerConfiguration *is set, and *IndexedPropertyEnumeratorCallback *is implemented, I can configure what is displayed on mouse over action (*Debugger.evaluateOnCallFrame *is passed from devtools on doing that operation.)
The implementation is provided below. void IndexedPropertyEnumeratorCallbackFunction( const v8::PropertyCallbackInfo<v8::Array>& p_callbackInfo) { v8::Local<v8::Array> IndexArray = v8::Array::New(p_callbackInfo.GetIsolate (), 2); IndexArray->Set( v8::Integer::New(p_callbackInfo.GetIsolate(), 0), v8::String::NewFromUtf8(p_callbackInfo.GetIsolate(), u8"x")); IndexArray->Set( v8::Integer::New(p_callbackInfo.GetIsolate(), 1), v8::String::NewFromUtf8(p_callbackInfo.GetIsolate(), u8"y")); p_callbackInfo.GetReturnValue().Set(IndexArray); } >From reading the embedder's guide, my understanding is that > indexed property interceptors - called when accessing indexed properties. > An example of this, in a browser environment, is document.forms.elements[0]. Why is it called on *evaluateOnCallFrame *action? Also, I tried with other callback s of v*8::IndexedPropertyHandlerConfiguration*, but they are not called. Can I know why? Also, since the signature of callback is as below : void (*IndexedPropertyEnumeratorCallback)( const PropertyCallbackInfo<Array >& info); I can set only arrays into the result and nothing else. I am not an expert in v8, hence these questions. Please let me know about it/ point me to some documentation regarding this. regards, Anoop R. S. On Tuesday, 8 May 2018 10:05:12 UTC+5:30, Anoop R. S. wrote: > > Hi All, > I am trying out a debugger prototype using the remote debugger protocol. > Going by the standard example in Embedder's Guide: > C++ class: > ------------- > class Point { > public: > Point(int x, int y) : x_(x), y_(y) { } > int x_, y_; > } > > Usage in JavaScript: > --------------------------- > var p = Point(1,2); > > Has anyone tried debugging a wrapped C++ object that is being returned to > Javascript? Is it possible? > > regards, > Anoop R. S. > -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.