Hi all-
I anticipate having some free time coming up and thought I might spend some of that working on the debugger project.
However, I’m not really sure where things stand. So, here are some questions to help me understand the situation:
1. How much of the code in play is related to what I originally had in the debugger concept branch? 2. Has any of that been merged into another working location? 3. I seem to recall there being a review of (some) debugging code. Has action been taken on any of those suggestions? 4. Mateusz had been working on an implementation of the debug server protocol. Is that complete from a client server standpoint? 5.I think at one point there was a demo project but that it didn’t actually connect to pike. What exactly is the status of that, or of the inevitable javascript-based plugin for VS Code? 6. Anything else I’m missing?
Or put another way: I want to write a pike program in, say, VS Code, and I want to be able to debug it there. How far from that goal will I be, and what needs to be done to get there?
Thanks in advance!
Bill
Hey Bill, Sorry for the late response. I'm happy for your interest in continuing the debugger project.
Most of the answers to your questions can be found in the 'debugger, status and suggestions sought' thread, in the last few letters. Archive link for convenience: [1]. For some wicked reason my response to this has not been recorded in the archive, so pasting it raw here: <copypaste> As discussed, I did the pre-merge cleanup, except:
- set_debugger() should probably not be an efun.
Apparently it has to be, else it appears as an unknown identifier in master.pike.
- Move low_enable_breakpoint and low_disable_breakpoint to program.c
I didn't really see any point in this, since these are helper methods of the debug_breakpoint pikeclass that change it's state.
I will go further with the TODOs, but I would feel much more comfortable if the changes in src and master were on master branch, since it would spare me regular sync nightmares like merge conflicts, etc. So if there is anything else to correct, please let me know. Otherwise - feel free to merge the changes.
They can be found on branch mkrawczuk_debugger_refactor. By the way, I was really unhappy about breaking the branch naming convention. The pre-receive hook kept telling me that "Common topic branch names are not allowed to contain /.", and I wanted to name my branch "mkrawczuk/debugger_refactor".
Again, thanks for a great conference and hoping to see you soon. </copypaste>
Now, to answer the questions: 1. Pretty much a lot. 2. Yes, I've made a new branch, mkrawczuk_debugger_refactor, in order to split commits as suggested by the reviewers. 3. As mentioned, the discussion was going on in the 'debugger, status and suggestions sought' thread 4. Yes, it's working, but requires some aesthetic work, like making it consumable by the autodoc. It's mentioned in the commit message's TODOs. 5. There's the pike-debug-adapter-playground[2] I've made at some point. As far as I recall, it's JS-free. The README should say it all, but in case of questions I encourage to open an issue/PR inside this project. 6. If I remind myself of anything, I will let you know.
To sum up: there's plenty of work done for the debugger and I've asked on the mailing list if I could merge the things done so far in order to avoid merge conflicts, especially in src and master.pike.in, (which in my opinion are complete, at least unless we will not find a better way to handle breakpoints) and then continue work on the Debugger pmod, documentation, etc. but never quite got an answer to this query. The refactored changes can be found on mkrawczuk_debugger_refactor branch. Here's a link to this branch on github mirror for convenience of browsing: [3]. The commit messages are pretty descriptive of what's been already done and what should still be done.
Do not hesitate to ask in case of any questions.
[1] https://lists.lysator.liu.se/pipermail/pike-devel/2019-August/016830.html [2] https://github.com/mkrawczuk/pike-debug-adapter-playground [3] https://github.com/pikelang/Pike/commits/mkrawczuk_debugger_refactor
sob., 8 lut 2020 o 16:08 H William Welliver william@welliver.org napisał(a):
Hi all-
I anticipate having some free time coming up and thought I might spend some of that working on the debugger project.
However, I’m not really sure where things stand. So, here are some questions to help me understand the situation:
- How much of the code in play is related to what I originally had in the debugger concept branch?
- Has any of that been merged into another working location?
- I seem to recall there being a review of (some) debugging code. Has action been taken on any of those suggestions?
- Mateusz had been working on an implementation of the debug server protocol. Is that complete from a client server standpoint?
5.I think at one point there was a demo project but that it didn’t actually connect to pike. What exactly is the status of that, or of the inevitable javascript-based plugin for VS Code? 6. Anything else I’m missing?
Or put another way: I want to write a pike program in, say, VS Code, and I want to be able to debug it there. How far from that goal will I be, and what needs to be done to get there?
Thanks in advance!
Bill
Hi! Thanks for the update.
I think it makes most sense to get the portions of the code that exist within existing files merged into the 8.1 codebase. Very little of the code is within an active path for most users, and I think the risk of running into unwanted behavior in the short term is outweighed by the possibility of more merge nightmares if it's kept on a feature branch.
In my mind, there's a logical argument to be made for splitting the effort into a) the componentry required to support debugging in pike, b) the componentry required to support one or more debugging protocols and c) any work required to be able to debug a pike program from a debugging tool.
The majority of the work required in the lower reaches of pike is more or less done. I believe the last major pieces are: - the ability to throw a thread into single-step mode - the ability to stop at any of multiple offsets for a given line - my proposal for naming threads - exception trapping
Each of these feel to me like incremental features and probably don't need to hold up integration.
The remaining major core functionality would likely be restricted to the Pike.Debug module: providing access to the additional low level features and mapping programs to file paths. I need to look more closely at how DAP and other debug tools handle step-into and friends; that will determine whether or not the core debugging support needs to handle those features directly or not.
As always, thoughts and feedback are welcome.
Bill
On 2020-02-14 03:45, Mateusz Krawczuk wrote:
Hey Bill, Sorry for the late response. I'm happy for your interest in continuing the debugger project.
Most of the answers to your questions can be found in the 'debugger, status and suggestions sought' thread, in the last few letters.
pike-devel@lists.lysator.liu.se