Hi Yang,

Thanks for quick response. We embed V8 in Android application and its JS 
code should be debuggable remotely like from browser. Currently, we are 
using node-inspector version 0.11.2 that communicates with embedded v8 with 
JSON format. If JSON debug API is deprecated, can you suggest the right 
debug API to use to make it work for my scenario.

Please provide any samples if possible.

Thanks
Srini 

On Wednesday, March 15, 2017 at 5:10:27 PM UTC+5:30, Yang Guo wrote:
>
> Sorry. I didn't see the Cpp files you included.
>
> I see that in JSDebugAgent.cpp you are using the legacy JSON debug API. It 
> has long been deprecated. Bugs are not going to be fixed, and I would not 
> be surprised if there are some.
>
> I took part of your code in myjsvm.cpp and patched it into d8 for a small 
> test. It seems to work fine. I get the correct set of properties for the 
> object. See https://codereview.chromium.org/2746053006
>
> Cheers,
>
> Yang
>
> On Wed, Mar 15, 2017 at 11:25 AM Yang Guo <[email protected] 
> <javascript:>> wrote:
>
>> Hi,
>>
>> thanks for the effort, but unless I can see how the V8 API is being used, 
>> I can't really help. I previously wrote a local test based on your 
>> description and everything works fine for me. Maybe you can extract the 
>> necessary pieces into a smaller snippet that you can share?
>>
>> Cheers,
>>
>> Yang
>>
>> On Wed, Mar 15, 2017 at 11:00 AM <[email protected] <javascript:>> 
>> wrote:
>>
>>>
>>> Hi Yang,
>>>
>>> I prepared the sample app to reproduce the issue.
>>> Here are the steps & artefacts attached to reproduce the issue.
>>>
>>> 1. Android installable APK(app-debug.apk). Download the APK from the 
>>> below link
>>>    APK : https://drive.google.com/open?id=0B3xInWT92YJubmY3eUZVQXNUNVE
>>>    Install the APK and run the app. App V8 debug port is fixed at 9222
>>>
>>> 2. Start Node Inspector (version-0.11.2) for debug perspective. Pls 
>>> follow below steps.
>>> (Debug session screen shot attached for your reference).
>>> Start node-inspector (version 0.11.2) at port 9222. Use the below 
>>> command to start the node-inspector.
>>>      
>>>      node-inspector  --debug-port 9222
>>>
>>> 3. Run the below adb command
>>>     adb forward tcp:9222 tcp:9222
>>>
>>> 4. Launch the below url in browser for debug perspective
>>>     http://127.0.0.1:8080/?ws=127.0.0.1:8080&port=9222
>>>
>>> 3. Android App source can be downloaded from below linj
>>> App : https://drive.google.com/open?id=0B3xInWT92YJuMW1YT2NWMmU3YXc
>>> Also attached the native code files for quick reference
>>>
>>>
>>> I wrote a sample script the depict the issue. Properties of 
>>> NambedObject's object are all displayed as undefined. you can see this with 
>>> either hover at the object or in scoped variables section.
>>>
>>>
>>> Thanks
>>> Srini
>>>
>>> On Monday, March 6, 2017 at 4:30:29 PM UTC+5:30, [email protected] 
>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> Will prepare the app for repro and send you soon.
>>>>
>>>> ~Srini
>>>>
>>>> On Monday, March 6, 2017 at 2:05:24 PM UTC+5:30, Yang Guo wrote:
>>>>>
>>>>> Interesting. Do you have a repro that I can use? In my local tests it 
>>>>> works fine.
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Yang
>>>>>
>>>>> On Mon, Mar 6, 2017 at 9:33 AM <[email protected]> wrote:
>>>>>
>>>>>>
>>>>>> 2:03 PM (less than a minute ago)
>>>>>> yes, Exactly. Debugger is able to get the property names through 
>>>>>> enumerator but not its corresponding values. All properties are shown as 
>>>>>> undefined. We expect, V8 should call NamedGetter for each property and 
>>>>>> send 
>>>>>> those prop-value map to the debugger. The same is happening for 
>>>>>> Non-NamedProperty objects.
>>>>>>
>>>>>> On Monday, March 6, 2017 at 1:16:08 PM UTC+5:30, Yang Guo wrote:
>>>>>>
>>>>>>> We use the NamedEnumerator to find the property names of the object. 
>>>>>>> Otherwise there is no way for V8 to know what property name to pass to 
>>>>>>> NamedGetter. NamedEnumerator return an array of property names that you 
>>>>>>> want the debugger to show.
>>>>>>>
>>>>>>> Cheers,
>>>>>>>
>>>>>>> Yang
>>>>>>>
>>>>>>> On Mon, Mar 6, 2017 at 8:15 AM <[email protected]> wrote:
>>>>>>>
>>>>>> We are using the V8 version 5.3.332 in my Android App. We are trying 
>>>>>>>> to debug the javascript using the Node-Inspector(0.11.3)(Also tried 
>>>>>>>> with 
>>>>>>>> Eclipse Chrome Dev Tools) but strangely values of certain object 
>>>>>>>> properties 
>>>>>>>> are not shown when we hover or seen it in scoped variables section. 
>>>>>>>> This 
>>>>>>>> behaviour is particularly seen for the V8 objects which has Named 
>>>>>>>> Property 
>>>>>>>> handler attached. If the V8 object is prepared with SetAccessor then 
>>>>>>>> values 
>>>>>>>> of all properties are shown properly.
>>>>>>>>
>>>>>>>> We observed that, For Named Property objects, its NamedGetter is 
>>>>>>>> not called for its properties so all properties are being shown as 
>>>>>>>> undefined.
>>>>>>>>
>>>>>>>> We are preparing the V8 object as below
>>>>>>>>
>>>>>>>> Local<FunctionTemplate> funTem = 
>>>>>>>> FunctionTemplate::New(isolate,callback);
>>>>>>>> Local<ObjectTemplate> inst = funTem->InstanceTemplate();
>>>>>>>>
>>>>>>>> inst->SetNamedPropertyHandler(NamedGetter,NamedSetter,NamedQueryCallback,0,NamedEnumerator);
>>>>>>>>
>>>>>>>> When Debugger tries to evaluate the expression of this object, only 
>>>>>>>> its NamedEnumarator is called but not its NamedGetter.
>>>>>>>>
>>>>>>>> Can you please let me know what could be the issue here.
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> -- 
>>>>>>>> v8-dev mailing list
>>>>>>>>
>>>>>>> [email protected]
>>>>>>>
>>>>>>>
>>>>>>>> http://groups.google.com/group/v8-dev
>>>>>>>> --- 
>>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>>> Groups "v8-dev" group.
>>>>>>>>
>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>>> send an email to [email protected].
>>>>>>>
>>>>>>>
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>> -- 
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> * •  *
>>>>>>> *Yang Guo** •  **Google Germany GmbH*
>>>>>>> * •  *Erika-Mann-Str. 33
>>>>>>> * •  *80636 Munich
>>>>>>>
>>>>>>>  •  [email protected]
>>>>>>>
>>>>>>>
>>>>>>> Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
>>>>>>>
>>>>>>> Registergericht und -nummer: Hamburg, HRB 86891 Sitz der 
>>>>>>> Gesellschaft: Hamburg
>>>>>>>
>>>>>>> Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat 
>>>>>>> sind, leiten Sie diese bitte nicht weiter, informieren Sie den Absender 
>>>>>>> und 
>>>>>>> löschen Sie die E-Mail und alle Anhänge. Vielen Dank. This e-mail is 
>>>>>>> confidential. If you are not the right addressee please do not forward 
>>>>>>> it, 
>>>>>>> please inform the sender, and please erase this e-mail including any 
>>>>>>> attachments. Thanks.
>>>>>>>
>>>>>> -- 
>>>>>> -- 
>>>>>> v8-dev mailing list
>>>>>> [email protected]
>>>>>> http://groups.google.com/group/v8-dev
>>>>>> --- 
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "v8-dev" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>> send an email to [email protected].
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>> -- 
>>>>>
>>>>>
>>>>>
>>>>> * •  *
>>>>> *Yang Guo** •  **Google Germany GmbH*
>>>>> * •  *Erika-Mann-Str. 33
>>>>> * •  *80636 Munich
>>>>>
>>>>>  •  [email protected]
>>>>>
>>>>>
>>>>> Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
>>>>>
>>>>> Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: 
>>>>> Hamburg
>>>>>
>>>>> Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat 
>>>>> sind, leiten Sie diese bitte nicht weiter, informieren Sie den Absender 
>>>>> und 
>>>>> löschen Sie die E-Mail und alle Anhänge. Vielen Dank. This e-mail is 
>>>>> confidential. If you are not the right addressee please do not forward 
>>>>> it, 
>>>>> please inform the sender, and please erase this e-mail including any 
>>>>> attachments. Thanks.
>>>>>
>>>> -- 
>>> -- 
>>> v8-dev mailing list
>>> [email protected] <javascript:>
>>> http://groups.google.com/group/v8-dev
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "v8-dev" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected] <javascript:>.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> -- 
>>
>>
>>
>> * •  *
>> *Yang Guo** •  **Google Germany GmbH*
>> * •  *Erika-Mann-Str. 33
>> * •  *80636 Munich
>>
>>  •  [email protected] <javascript:>
>>
>>
>> Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
>>
>> Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: 
>> Hamburg
>>
>> Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind, 
>> leiten Sie diese bitte nicht weiter, informieren Sie den Absender und 
>> löschen Sie die E-Mail und alle Anhänge. Vielen Dank. This e-mail is 
>> confidential. If you are not the right addressee please do not forward it, 
>> please inform the sender, and please erase this e-mail including any 
>> attachments. Thanks.
>>
> -- 
>
>
>
> * •  *
> *Yang Guo** •  **Google Germany GmbH*
> * •  *Erika-Mann-Str. 33
> * •  *80636 Munich
>
>  •  [email protected] <javascript:>
>
>
> Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
>
> Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: 
> Hamburg
>
> Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind, 
> leiten Sie diese bitte nicht weiter, informieren Sie den Absender und 
> löschen Sie die E-Mail und alle Anhänge. Vielen Dank. This e-mail is 
> confidential. If you are not the right addressee please do not forward it, 
> please inform the sender, and please erase this e-mail including any 
> attachments. Thanks.
>

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to