digitalmars.D - Compile-Time Debugging with pragma(msg, ...) and Emacs Flycheck
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (11/11) Aug 19 2020 If you're using Emacs Flycheck when coding D the following snippet
If you're using Emacs Flycheck when coding D the following snippet pragma(msg, __FILE__, "(", __LINE__, ",1): Info: ", EXPRS...); may come useful. This inserts a preabmle before `EXPRS...` that is recognized by Flycheck as a compiler info diagnostics. Your message(s) `EXRPS...` will now show up inside the *Flycheck errors* buffer. For instance, if you want to know the type of some variable `x` you can use auto x = f(); // returns some complex type pragma(msg, __FILE__, "(", __LINE__, ",1): Info: ", typeof(x));
Aug 19 2020