ESP32 how to halt on crash

Does anyone know when using an ESP32 how to get the execution to halt on a crash (instead of rebooting)? I tried these combinations but none work:

build_flags = 
    -D CONFIG_ESP_SYSTEM_PANIC=CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT 
    -D CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y     
    -D CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT=n

If you’re using a regular Arduino-ESP32 project (framework = arduino), then changing ESP-IDF configuration variables will have exactly 0 effect since Arduino-ESP32 contains a precompiled ESP-IDF libary files. Aka, they are not recompiled.

You should try these options out first in a pure ESP-IDF project (example) to see if they are the right options to tinker with. If that is the case, you should be able to transfer that to a combined ESP-IDF plus Arduino-ESP32 an ESP-IDF component project (example).