Mono - Debug.Assert does not work

前端 未结 3 1843
后悔当初
后悔当初 2021-02-20 02:37

I have this program here:

namespace TodoPlus {
using System.Diagnostics;

    public class LameProg {
        public LameProg() {}
        public static void Mai         


        
3条回答
  •  隐瞒了意图╮
    2021-02-20 02:42

    I believe you need two things: the DEBUG attribute to the compiler, and a 'trace listener' for the runtime. I got it to work with

    % export MONO_TRACE_LISTENER=Console.Error
    % mcs -define:DEBUG -debug Prog.cs
    % mono Prog.exe
    

    That still doesn't exit immediately on assertion failure as I would have expected, but at least it prints something.

提交回复
热议问题