Mike Stall has a great little sample showing how to make your dynamically generated code debuggable. However, there is one more detail you should be aware of. By default the JIT compiler will enable optimizations for the module, making debugging difficult