jerryscript
jerryscript copied to clipboard
Some questions when debugging JS Script?
Hi:
- I would like to know if there is any method to print out the details of objects during debugging my JS script in jerry, just like% DebugPrint in d8:
DebugPrint: 0x2aed08109a75: [JSArray]
- map: 0x2aed082c3a41 <Map(PACKED_SMI_ELEMENTS)> [FastProperties]
- prototype: 0x2aed0828c0e9 <JSArray[0]>
- elements: 0x2aed082932dd <FixedArray[3]> [PACKED_SMI_ELEMENTS (COW)]
- length: 3
- properties: 0x2aed0800222d <FixedArray[0]>
- All own properties (excluding elements): {
0x2aed080048f1: [String] in ReadOnlySpace: #length: 0x2aed0820215d <AccessorInfo> (const accessor descriptor), location: descriptor
}
- elements: 0x2aed082932dd <FixedArray[3]> {
0: 1
1: 2
2: 3
}
-
Is there any support for GDB, or can I only write my own debugger like the sample program in jerry-debugger folder
-
Can the breakpoint be set in the JS file, like %SystemBreak in d8 instead of setting a breakpoint in the debugger
Thank you very much!
Hi!
1 - 2, These features are not available and currently we are not planning to do it. However any contributions are welcome. 3, You can use the debugger statement in the JS code which automatically inserts a breakpoint for the debugger.