Page 1 of 1

Debugger breakpoint function for ZScript

Posted: Tue Jan 01, 2019 2:57 am
by phantombeta
This would be quite useful for debugging problems in the VM or JIT related to specific ZScript functions. Would be quite easy to do in the JIT, as it would be just an int3 instruction.
Obviously, this should only be available in debug builds - Release builds should either do nothing or outright fail to compile if the function is encountered.
Something like this, perhaps:

Code: Select all

    double foo (int x) {
        DebuggerBreakpoint ();
        return x / (1 / 16);
    } 
I'd be willing to add/code this myself, if preferred.

Re: Debugger breakpoint function for ZScript

Posted: Tue Jan 01, 2019 3:18 am
by _mental_
For this purpose I'm using Console.Printf() with a breakpoint set here. So it’s kinda DIY in my opinion.