MySQL 26.10 Reference Manual  /  ...  /  Interaction with the --debug Option

10.15.7 Interaction with the --debug Option

Anything written to the trace is automatically written to the debug file.