I am running Qt Creator 3.2.1, Based on Qt 5.3.2 (GCC 4.9.2, 32 bit), on my raspberry pi.
When I click debug, the application does not deploy and it says the debugger is finished.

Auto Detected Debugger: System GDB at /usr/bin/gdb


The debugger log says the following:

121attach 7734
>&"attach 7734\n"
>~"Attaching to process 7734\n"
>&"ptrace: Operation not permitted.\n"
>121^error,msg="ptrace: Operation not permitted."
dptrace: Operation not permitted.
d
dCould not attach to the process. Make sure no other debugger traces this process.
dCheck the settings of
d/proc/sys/kernel/yama/ptrace_scope
dFor more details, see /etc/sysctl.d/10-ptrace.conf
dNOTE: ENGINE RUN FAILED
sRun failed.
dState changed from EngineRunRequested(7) to EngineRunFailed(8) [master]
dState changed from EngineRunFailed(8) to EngineShutdownRequested(20) [master]
dQUEUE: SHUTDOWN ENGINE

dQUIT DEBUGGER REQUESTED IN STATE 20
dCALL: SHUTDOWN ENGINE
dINITIATE GDBENGINE SHUTDOWN IN STATE 0, PROC: 2
<122-gdb-exit
>122^exit
dGDB CLAIMS EXIT; WAITING
dGDB PROCESS FINISHED, status 0, code 0
dNOTE: ENGINE SHUTDOWN OK
dState changed from EngineShutdownRequested(20) to EngineShutdownOk(22) [master]
dState changed from EngineShutdownOk(22) to DebuggerFinished(23) [master]
dQUEUE: FINISH DEBUGGER
dNOTE: FINISH DEBUGGER
dHANDLE RUNCONTROL FINISHED
sDebugger finished.

Please help me I cant carry on with my project if I cant debug, thanks