atom-slime icon indicating copy to clipboard operation
atom-slime copied to clipboard

Display Stack Trace in Debug Pane

Open neil-lindquist opened this issue 7 years ago • 7 comments

This adds the stack trace to the debug pane, below the available restarts. It initially shows the stack frames that are sent with the initial debug message from swank, with an option to load the entire stack trace. This pull request depends on sjlevine/swank-client-js#5.

This is my first time using Coffeescript, so please let me know if it can be improved. I used the code for restarts as my template.

neil-lindquist avatar Jun 21 '18 00:06 neil-lindquist

This sounds great, thank you very much for your efforts! I'll try and take a look in the next week and will keep you posted.

sjlevine avatar Jun 21 '18 12:06 sjlevine

I started working on extending this to include more inspection functionality. Should that be included in this pull request, or should it get a separate pull request? The code for stack traces is complete now, but the other functionalities needs a fair bit of work yet.

neil-lindquist avatar Jun 23 '18 18:06 neil-lindquist

I've gotten the additional functionality working nicely. So, all in total this adds:

  • backtraces (as mentioned before)
  • information and actions for each stack frame including
    • local variables
    • catch tags
    • frame source
      • I didn't get all of the possible source location's implemented, its missing:
        • zip files
        • specific methods/functions in a file
        • source path objects
    • restart the frame (where supported)
    • return a specific value from the frame
    • disassembling the frame
      • I wasn't able to actually test this, since none of the implementations I have installed have disassemble frame implemented in swank
      • I tested it somewhat using return-from-frame on the missing implementation error
    • eval a form in the frame

This seems to cover all the functionality listed in Slime's documentation except for pretty-print-eval in-frame (I can't remember the complication that came up) and the stepping commands (mainly because I'm not figuring out a good way to implement them and they seem less useful than the rest of this).

I've tested using SBCL 1.4.2 on Windows 10 and Atom 1.27.2

Here's what it ends up looking like: debug frame-info frame info after the disassemble button is pressed frame-info_disassemble

neil-lindquist avatar Jul 06 '18 02:07 neil-lindquist

Awesome ! And congrats.

vindarel avatar Jul 06 '18 16:07 vindarel

Wow, great work! Thank you very much for your contributions! I apologize that I haven't had a chance to look at this yet, but it's definitely on my to-do list. I'll try to take a look soon :-)

Thanks again!

sjlevine avatar Jul 06 '18 17:07 sjlevine

Hello, and up ?

vindarel avatar Aug 28 '18 07:08 vindarel

I rebased this onto master and everything still appears to be working.

neil-lindquist avatar Dec 23 '18 02:12 neil-lindquist