4 merge requests!368Update prace.md to document the change from qprace to qprod as the default...,!367Update prace.md to document the change from qprace to qprod as the default...,!366Update prace.md to document the change from qprace to qprod as the default...,!323extended-acls-storage-section
Before debugging, you need to compile your code with these flags:
Before debugging, you need to compile your code with these flags:
!!! note
!!! note
\-**g**: Generates extra debugging information usable by GDB. -**g3** includes even more debugging information. This option is available for GNU and Intel C/C++ and Fortran compilers.
`-g`: Generates extra debugging information usable by GDB. `-g3` includes even more debugging information. This option is available for GNU and Intel C/C++ and Fortran compilers.
\- **O0**: Suppresses all optimizations.
`-O0`: Suppresses all optimizations.
## Starting a Job With DDT
## Starting a Job With DDT
Be sure to log in with an X window forwarding enabled. This could mean using the -X in the ssh:
Be sure to log in with an X window forwarding enabled. This could mean using the `-X` in the `ssh`:
Then launch the debugger with the ddt command followed by the name of the executable to debug:
Then launch the debugger with the `ddt` command followed by the name of the executable to debug:
```console
```console
$ddt test_debug
$ddt test_debug
```
```
A submission window appears with a prefilled path to the executable to debug. Select the number of MPI processors and/or OpenMP threads on which to run, then press run. Command line arguments to a program can be entered to the "Arguments " box.
A submission window appears with a prefilled path to the executable to debug. Select the number of MPI processors and/or OpenMP threads on which to run, then press run. Command line arguments to a program can be entered to the Arguments field.


To start the debugging directly without the submission window, the user can specify the debugging and execution parameters from the command line. For example, the number of MPI processes is set by the "-np 4" option. Skipping the dialog is done by the "-start" option. To see the list of the "ddt" command line parameters, run "ddt --help".
To start the debugging directly without the submission window, the user can specify the debugging and execution parameters from the command line. For example, the number of MPI processes is set by the `-np 4` option. Skipping the dialog is done by the `-start` option. To see the list of the `ddt` command line parameters, run `ddt --help`.