Add _v_() debug helper maco

This can be used with streams.
  LYXERR0(_v_(var))
leads to the message
 "var=<value of var>"
This commit is contained in:
Jean-Marc Lasgouttes 2023-08-31 12:54:53 +02:00
parent 19db2a539f
commit 2092663365

View File

@ -262,4 +262,13 @@ extern LyXErr lyxerr;
} while (0)
/** Helper debug macro for quick and dirty logging. For example
* int var = 2;
* LYXERR0(_v_(var) << _v_(var + 1));
* yields
* var=2 var + 1=3
* Not a great typesetting, but it is handy in debugging sessions.
*/
#define _v_(var) #var"=" << var << " "
#endif