debug_points
The `debug_points` directive controls the behavior of NGINX when specific debug points are reached during processing.
Description
The debug_points directive is intended for developers and advanced users who want to manipulate the execution flow of the NGINX server for debugging purposes. This directive can be configured in the main context and accepts a single argument that specifies which debug point to trigger. The operands available for this directive are stop and abort, each affecting the NGINX process differently when reached during execution.
When set to stop, NGINX will pause execution at the defined debug point, allowing the user to attach a debugger if required. This can be particularly useful for step-by-step analysis of the application behavior in response to specific requests or system events. On the other hand, choosing abort will cause the process to terminate immediately, which is useful for debugging fatal errors or ensuring that system integrity is maintained during specific undesirable states.
The behavior of the debug_points directive can greatly enhance the debugging experience when developing or troubleshooting modules and configurations in NGINX. It serves as a mechanism to introduce intentional breakpoints in the code without making modifications to the actual source code, thereby facilitating more effective debugging workflows.
Config Example
debug_points stop;
Ensure that your NGINX build has debugging support enabled, as this directive may not work otherwise.
Using debug_points will affect the performance of NGINX; it should be removed or commented out in production settings.