![](https://secure.gravatar.com/avatar/d0e94fb08d4620cfbd2f8f59a7868637.jpg?s=120&d=mm&r=g)
On 10/18/2013 03:22 PM, stephleg@free.fr wrote:
Hello,
After reading "Getting Web Content and pdf-Output from One Source" by Thomas A. Schmitz, i'm trying to use the same method to build a PDF file from a HTML one. But i quickly found that when something doesn't work as expected, it's pretty hard to debug because it's hard to tell if the error come from the environment file, the lua code or something else.
So are there some useful tricks to debug this kind of processing besides the \enabletrackers command? Especially is there a way to view the generated ConTeXt code after the macro expansion?
Thank you.
Let me put it this way: if there is a way, I don't know about it. You're right that debugging becomes more complex because there are more layers of complexity involved. OTOH: many editors can validate xml as you type (I don't know of any that does the same for TeX input), so at least you know when your source should compile. And one tip (something I have started too late): put your lua code in a separate file and call it from within your TeX environment, that way, context's error messages become more precise. Good luck! Thomas