Closed haosu1987 closed 7 years ago
+1
Hi, @haosu1987. Great! We also considering about it. Do you think it is suitable to support V8 debugger protocol in JerryScript? Or, do you have any idea better than this? As for IDE, is it a good choice integrate to Eclipse? How about Sublime Text, ATOM, Microsoft Code etc.?
Hi, @lemmaa . Thanks for your prompt.
I think V8 Debugger Protocol may not be suitable for the embedded system(especially for constrained devices). It's a large overhead that based on JSON format strings. Thus, we need a tiny protocol at first. It can be designed by a serial of compressed instructions (for example Duktape Debug stream format), that contains some basic functions, as:
Then, we can consider that how to debug the devices upon the protocol.
I choose the Eclipse because of the Chrome DevTools plugin. It's also an open source project that implements V8 Debugger Protocol. We can translate our protocol to V8 Debugger Protocol by a debug bridge, and may debug with Eclipse Chrome DevTools directly.
As for other IDEs, I think we can also support by the debug bridge. But, it may spend a little time to adapt.
@haosu1987 in case we're going to debug on hosts I'd prefer to have support of V8 Debugger Protocol, since it's widely adopted by IDEs and editors, like Eclipse, Atom etc. So, we won't spend much time on integration.
Anyway, we can start implementation of debugging capabilities in our shell #712, which would be the most difficult part of the task. Engine itself shouldn't have to support V8's, Duktape's or any other protocol - it should only provide API for debugging. Actual integration would be handled by debugger as @haosu1987 mentioned.
@egavrin After all, we should implement debugger server as separate module, not in our shell, I think. Because it should be activated in embedded situation, such as IoT.js.
As for features, it needs to support both serial connection and TCP/IP connection for remote debugging. We have to make it as light as possible, because it will run on the target in limited resource.
Therefore, IMHO, define protocol as light as possible is important in this task. Integration with IDEs, which support well known protocol such as V8's, can be done by bridge server (or module) which run on host PC.
Ping~
Any progress on the JS debugger feature request?
Thanks -Weiliang
Hello @weilianglin, me and @knightburton are working on this topic now
@polaroi8d https://github.com/knightburton/jerryscript/commits/remote-debugger I am working in a web IDE to write and upload into the Arduino 101 using the serial port & later bluetooth. Still need to get approval to open source it but i think it would be interesting if i could add debugging functionality.
@polaroi8d and @knightburton: this sounds interesting. Can you give an update on how far along you are with this? Later down the road, it would be interesting to be able to hook this up to the Blink Developer Tools (maybe by modifying https://github.com/node-inspector/node-inspector).
Sorry for the late answer @martijnthe. Now I am updating the repository, because there is a new build system.
Closing due to inactivity. Please reopen if needed.
I've used some other JS interpreter, which includes its own debugging protocol, and can be integrated into the IDEs. For example, Eclipse can debug both the Node.js and the JS in the Web with the ChromeDevTools Plugin that impliments the V8 debugger protocol. I think that embedded systems also need such a protocol with its associated debugging tools , to help us debug and develop JS projects.