How to add sudo when debugging

Event

** [Errno 13] Permission denied ** occurred when debugging Python with Visual Studio Code.

image.png

Cause

The target Python code required administrator privileges, but sudo was not added when debugging Visual Studio Code. (obviously)

Workaround

Just add " sudo ": true to launch.json and you're good to go.

image.png

Recommended Posts

How to add sudo when debugging
How to specify command line arguments when debugging in PyCharm
How to add AWS EBS volume
How to add a package with PyCharm
How to get IP when Tornado + nginx
How to add python module to anaconda environment
How to add options to Django's manage.py runserver
How to deal with errors when hitting pip ②
[Django] How to resolve errors when installing mysqlclient
How to add arbitrary headers to response with FastAPI
How to deal with SessionNotCreatedException when using Selenium
How to add a Python module search path
How to fix when Terminal input becomes abnormal
How to remember when you forget a word
How to add Anaconda Powershell Prompt to Windows Terminal?
[ESXi (vCenter)] How to add NIC for CentOS 7.3
How to add pre-save processing when adding objects on the Django admin site
Add convolution to MNIST
How to use xml.etree.ElementTree
How to use Python-shell
How to use tf.data
[Python] [Django] How to use ChoiceField and how to add options
Scraping 2 How to scrape
How to add help to HDA (with Python script bonus)
How to use Seaboan
How to use image-match
How to use shogun
How to install Python
How to use Pandas 2
[Ansible] How to use SSH password authentication when executing ansible
How to read PyPI
How to install pip
How to use Virtualenv
How to use numpy.vectorize
How to update easy_install
Memo of how to use properly when combining pandas.DataFrame
How to install archlinux
How to use pytest_report_header
How to disable the reference feature when outputting PyYaml
How to restart gunicorn
How to install python
How to virtual host
How to debug selenium
How to use partial
How to use Bio.Phylo
How to read JSON
How to use x-means
How to use WikiExtractor.py
How to update Spyder
How to access with cache when reading_json in pandas
How to use IPython
How to install BayesOpt
How to use virtualenv
[Note] How to give sudo authority to user on CentOS
How to use Matplotlib
How to use iptables
How to add page numbers to PDF files (in Python)
How to use numpy
How to exit when using Python in Terminal (Mac)
How to use TokyoTechFes2015
How to use venv