Skip to content

Attach debug messages to assertion failures #25

@knrafto

Description

@knrafto

I've noticed if I do a dbgprintf and then an assert(false), sometimes the debug message isn't printed before the program dies. I'm not sure why. Compiler optimization? Stream not getting flushed?

I would appreciate it if there was a function like

dbgassert(bool, const char* _format, ...)

where I could add a nice debugging message for why the assertion failed (similar to LOG(FATAL) or CHECK() at Google), and also log the component info like dbgprintf() does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions