- srsRAN requires to run with
sudo
for accessing USRP software radios. - vscode runs as unprivileged user.
- attaching a debugger (running unprivileged) to srsRAN (privileged) won't work.
See here: microsoft/vscode-remote-release#2053 (comment)
Create a file /usr/share/polkit-1/actions/com.ubuntu.pkexec.gdb.policy
and add:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<action id="com.ubuntu.pkexec.gdb-settings">
<icon_name>gdb-settings</icon_name>
<defaults>
<allow_any>yes</allow_any>
<allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/gdb</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>