diff --git a/vlib/v/gen/cgen.v b/vlib/v/gen/cgen.v index 8ff633efc6..b770e7b794 100644 --- a/vlib/v/gen/cgen.v +++ b/vlib/v/gen/cgen.v @@ -199,8 +199,9 @@ pub fn (mut g Gen) init() { } g.comptime_defines.writeln('') } - - + if g.pref.is_debug || 'debug' in g.pref.compile_defines { + g.comptime_defines.writeln('#define _VDEBUG (1)') + } } pub fn (mut g Gen) finish() {