CMAKE_CXX_FLAGSfor your project.
hadean::stop("reason")in your simulation code, which will cause that process to pause at that call, allowing a debugger to be attached. The
reasonprovided is an arbitrary string of your choosing so you can identify the point and process that has been paused.
aether run. By using
aether run --debugyou will enable the
hadean::stop()calls to be respected, and Hadean Platform will also launch the appropriate additional tooling required to enable a debugger to be attached to your simulation.
hadean::stop(), other processes will pause at the end of the current tick. This avoids the issue of the other processes in the simulation from continuing to simulate whilst you are trying to debugging a specific process.
aether list-paused-processes, which will present the Hadean PID and the reason that process paused. For example, if you add the line
hadean::stop("A collision occurred");to the physics demo collision callback, then the output of
aether list-paused-processesmay look like this:
hadean::stop()calls will then re-pause the simulation. Also note that if you set breakpoints inside Visual Studio these will not work until you connect the debugger to a specific process.
hadean::stop()call, but you wish to continue the simulation without attaching a debugger, then you can run
aether continue-allto continue any processes that have stopped. If you run this whilst debugging a specific process, then all the other processes will continue.
stopin Visual Studio when debugging a simulation.