This content originally appeared on DEV Community and was authored by vindarel
_____ __ __ __
/ ___/ / / \ \/ / |\ _,,,---,,_
\__ \ / / \ / /,`.-'`' -. ;-;;,_
___/ / / /___ / / |,4- ) )-,_..;\ ( `'-'
/____/ /_____/ /_/ '---''(_/--' `-'\_)
Read on:
Man CL is awesome. I absolutely love being able to debug libraries, live, when there's a problem. Registering stickers, changing the library code, hot reloading... god,
I feel so much faster and free.
[Question] Sly stickers are basically like elisp's edebug stepping through code yea?
Yes, but more pin-point. You can consume the results in two ways:
- Run the code to completion and inspect all results of all stickers after-the-fact
- Turn on "breaking stickers" and have the debugger come up before and after each sticker, displaying the results.
It's great for visibility. I noticed some weird behaviour in a library this morning, so I jumped-to-def, which took me into my local Qlot copy of the lib, then I set a bunch of stickers, recompiled the function, then ran my own code to inspect the issue.
"When I run my code X, what is happening at library location Y?" <- I can answer this question instantly in CL but not other langs.
This is not me saying this for once, but someone proficient in Rust, Haskell, Clojure and CL (and probably more), also the author of the AURA package manager for Arch Linux.
- look up Sly stickers here: https://github.com/joaotavora/sly?tab=readme-ov-file#stickers
- more about debugging in CL: https://lispcookbook.github.io/cl-cookbook/debugging.html Slime doesn't have Sly's stickers, but it has a stepping debugger, and a configurable
trace
macro (do stuff before or after something), and more.
and… that's it!
This content originally appeared on DEV Community and was authored by vindarel
vindarel | Sciencx (2024-08-19T16:35:53+00:00) Debugging Common Lisp: “I feel so much faster and free”. Retrieved from https://www.scien.cx/2024/08/19/debugging-common-lisp-i-feel-so-much-faster-and-free/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.