title: How does a macro-enabled language keep track of the source code for debugging?
body: <p>This is a more theoretical question about macros (I think).  I know macros take source code and produce object code without evaluating it, enabling programmers to create more versatile syntactic structures.  If I had to classify these two macro systems, I'd say there was the "C style" macro and the "Lisp style" macro.</p>
  
  <p>It seems that debugging macros can be a bit tricky because at runtime, the code that is actually running differs from the source.</p>
  
  <p>How does the debugger keep track of the execution of the program in terms of the preprocessed source code?  Is there a special "debug mode" that must be set to capture extra data about the macro?</p>
  
  <p>In C, I can understand that you'd set a compile time switch for debugging, but how would an interpreted language, such as some forms of Lisp, do it?</p>
  
  <p>Apologize for not trying this out, but the lisp toolchain requires more time than I have to spend to figure out.</p>