Hi all,
After a helpful conversation at the pike meet-up last month, I’ve been working on a proof-of-concept debugger for pike code. There is a lot of work left to do, and hopefully others will help me out, but I think that things are at a point where it can be used to do actual debugging.
I’ve put together a page[1] with my notes (and the code contains a lot of TODOs as well). Please take a look at both the page and the branch (bill/debugger-poc) and let me know if you think there are glaring faults in the approach. I am certain that there are a lot of small bugs as well. Please feel free to dig in and help out.
I suspect that a lot of the work to be done won’t really make a lot of sense until there’s a debugging client to use it with (beyond the hilfe I’ve been testing with).
There are a few items that I think I probably need guidance with:
1. Local names aren’t available. Previously, I attempted to parse these out of the source code, but I suspect that’s a losing battle. 2. I was chatting with Mateusz and we were thinking that something that gave us access to the parse tree might be helpful for clients. I wrote a Pike parser in java that is used by the eclipse plugin I wrote, and this allowed generating useful navigation and variable data. Would a native pike equivalent be useful for this and things such as a hypothetical Language Server Protocol? Maintaining duplicate code is probably not the best use of our time; but I suspect that the existing source isn’t really set up to allow this sort of piggy-back use.
As always, feedback and suggestions are welcome!
Bill
[1] http://wiki.gotpike.org/index.pike/PikeDevel/PikeDebugger