Open mmontone opened 2 years ago
I realize there's no EQUALP in JSCL, so I'm trying with STRING=, but error still:
CL-USER> (defun ilt-apropos (string)
... ... (let (found)
... ... (dolist (package (list-all-packages))
... ... (do-external-symbols (sym package)
... ... (when (search string (symbol-name sym) :test #'string=)
... ... (push sym found))))
... ... found))
ILT-APROPOS
CL-USER> (ilt-apropos "LIST")
...
ERROR: Variable ... is unbound.
So, it'd still be nice if there's a way for me to debug things.
My bad, that last version is working. I was getting those ... because of copying pasting at the REPL.
But still, any tips on debugging are welcomed.
I don't really have specific tips, other general recommendation like trying your code often to know what is most likely to have caused the issue or narrow down cases to the simplest code that gets you the error or adding some print
calls 🙂
Improvements in this area would be great!
I think I found the reason for the bad error message. I'll create a pull request!
@mmontone I added a detailed description of how I went to fix the issue in the PR description at #439 .
It's not really any debugging tip but, hopefully it helps a bit! It would be great to have proper stacktraces.
I guess the natural step is trying to have sourcemap support in JSCL, but that might require some work.
Thank you!
I've tried by sending errors to console. I can visualize some error object and a stack there, but doesn't help much.
The easiest for now I think it is to make errors as informative as possible, as you've done with your fix. That's not always the case in JSCL.
Hi,
is there a way for me to debug things when something goes wrong ? Like, get a backtrace or something.
I'm trying this at JSCL repl:
But I get:
It works in SBCL for example, so it is not that my function is buggy.
Thanks!