Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac OS Mojave microphone permission for Visual Studio Code

Tags:

I'm trying record audio with PyAudio however when working in VSCode no microphone permission request is generated.

I have done an NVRAM reset which allowed me to run the script though the terminal (after it generated a permission request).

Within the privacy settings the only apps available are Chrome and Terminal, so it is not possible to give VSCode permission here.

Is there a way to force a permission request for VSCode? Or somehow otherwise edit the microphone permissions?

like image 996
Batch Avatar asked Apr 17 '20 17:04

Batch


1 Answers

VScode may have a bug in that it doesn't seem to request permissions when needed. I'm facing a similar problem when trying to create an Excel spreadsheet using xlwings (OS is Catalina). I found a related github ticket #95062 saying VScode doesn't ask for permissions to access media devices.

I can bypass the need for requesting permissions by launching VScode with admin permissions from terminal sudo /Applications/Visual\ Studio\ Code.app/Contents/MacOS/Electron. I can also run my xlwings code from terminal with normal permissions because terminal requested the needed permissions when expected. PyCharm also asked for permission when used to run the same xlwings code, which reinforces my belief that it's a permissions request bug in VSCode.

like image 193
Tracy Giles Avatar answered Sep 20 '22 16:09

Tracy Giles