On 11/08/2016 08:36 AM, Jean-Marc Lasgouttes wrote:
> Le 08/11/2016 à 14:20, racoon a écrit :
>> When fiddling with the code I often would like to print output some
>> value to a console (the message pane?). What is a good way to do this?
>
> You can use the stream lyxerr:
>
> lyxerr << "Variable foo is " << foo <<endl;
>
> This may require to add #include "support/debug.h" in the file.

There's a macro that makes this slightly easier:

    LYXERR0("Variable foo is " << foo);

It also prints the source position in case you have many of these.

Note that many LyX types can be used in this way, not just the obvious ones.

Richard

Reply via email to