7

During web searching, I found the following comment : Traditional Lisp debugging practices can still be used.

  • What are the traditional debugging practices?
  • Normally, what tools are used for debugging lisp (with/without emacs)?
2
  • 5
    @rlb.usa I dont know what constitues a "toy language", but Lisp has been used in several logistics planning systems by the US Army, been deployed to spacecraft control (and even remotely debugged), in several AI and AI-related systems, and behind ITA Software, the search enginge for cheap flights, just bought by google for $700M. Commented Jul 15, 2010 at 22:21
  • SLIME is an awesome development environment for CL that runs on Emacs. I never use any other REPL for CL. Commented Jul 26, 2010 at 6:54

5 Answers 5

3

I don't know what Bill meant specifically, but IME:

Typically your editor will have a running instance connected to it. You can compile functions immediately to insert them into the running image -- since Lisp has its own compiler, you're just telling the running image to read and compile a small section of text. Or you can run functions directly, to see what they do.

When an exception is thrown (or a condition is signaled, if you're lucky enough to be in a dialect with conditions), the debugger will show you the stack trace and let you decide how to continue.

The major difference between Lisp and other high-level compiled languages is that in Lisp you're basically always writing code with the debugger attached.

Sign up to request clarification or add additional context in comments.

Comments

3

As clojure was tagged in the question, I'll give our perspective.

Class files generated by the clojure compiler include line- and method-based debugging info, so any java debugger will interoperate directly with clojure code, including breakpoints and object inspection.

If you use emacs/slime as your development environment, integration with slime's debugger has recently been included. As documentation is a little sparse, it's probably best to check out the scope of the support on github directly.

Comments

2

Run edebug-defun in emacs and you will see that lisp is magic.

Comments

2

In something that I would call approaches a "traditional set of Lisp debugging techniques" are:

  • Debug printouts
  • Function tracing (each invocation of a traced function is printed with an indentation that corresponds to call depth, on return the return value is printed).
  • Explicit invocation of the in-image debugger
  • Ending up in the in-image debugger due to a bug (trying to add an integer and a symbol, for example)

Comments

0

Basically just things like adding code to print out values as it runs so you can see what's happening.

1 Comment

Sounds lika a C# programmer.. (it's a compliment)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.