# Debugging with OpenOCD

Make sure the following line is present in the .cfg file for your target:

```
 gdb_port 3333
```

Edit the port number if necessary. Specify that port in the process options and use the Debugger, Attach command.

Tips: Use the GDB command line (see [Output window](https://docs.hex-rays.com/user-interface/menu-bar/common-actions-6#output-window)) to send commands directly to OpenOCD interpreter.
