# regular user can't debug program



## Raffeale (Feb 4, 2021)

today, I.just compile a hello world program, and use lldb or gdb ,I can't. debug it ,.it said process launch failed. child trace failed, then I use root trying to debug it,it could debug with root user. what's wrong


----------



## im (Feb 4, 2021)

The similar thread solved by `sysctl security.bsd.unprivileged_proc_debug=1`








						Solved - Debuggers not working?
					

I have been writing some C codes lately and found that both lldb and gdb are not working as expected. Perhaps I am doing something wrong? In the following, I am running a freshly installed FreeBSD 11.0-RELEASE on bhyve, but I have the same problem on my host machine as well.   %freebsd-version...




					forums.freebsd.org
				




```
sysctl -d security.bsd.unprivileged_proc_debug
security.bsd.unprivileged_proc_debug: Unprivileged processes may use process debugging facilities
```


----------



## Raffeale (Feb 4, 2021)

thanks a lot, the freebsd is really safety


----------

