Vscode-cpptools: "hello-world" would like to access files in your Documents folder

Created on 11 Apr 2020  路  3Comments  路  Source: microsoft/vscode-cpptools

  • OS and Version: macOS 10.15.4
  • VS Code Version: 1.44.0
  • C/C++ Extension Version: 0.27.0

Hello, every time I start debugging, I get prompt like this:

"hello-world" would like to access files in your Documents folder

How to disable the prompt?

Thanks,

external

Most helpful comment

I see hello-world appear at the Files and Folders list, and I uncheck the hello-world, now it works.

3

I have tried to use g++-9(Homebrew GCC 9.3.0) / gdb(GNU gdb (GDB) 9.1) to build and debug. I have signed the gdb following this article: https://sourceware.org/gdb/wiki/PermissionsDarwin

codesign -vv /usr/local/bin/gdb
/usr/local/bin/gdb: valid on disk
/usr/local/bin/gdb: satisfies its Designated Requirement

But I still can't debug using VSCode with g++-9/gdb. It seems when using g++-9 to build, it will generate an application for hello-world.

Now I switch to use clang/lldb to build and debug. Hope VSCode will support documents for how to debug using gdb on macOS.

Thanks,

All 3 comments

The "hello-world" would like to access files in your Documents folder comes from the macOS operating system. The terminal program you are using does not permissions to access your file system. You can fix this by giving your terminal access in Security & Privacy -> Privacy -> Files and Folders and click on the checkbox for Terminal.

image

I see hello-world appear at the Files and Folders list, and I uncheck the hello-world, now it works.

3

I have tried to use g++-9(Homebrew GCC 9.3.0) / gdb(GNU gdb (GDB) 9.1) to build and debug. I have signed the gdb following this article: https://sourceware.org/gdb/wiki/PermissionsDarwin

codesign -vv /usr/local/bin/gdb
/usr/local/bin/gdb: valid on disk
/usr/local/bin/gdb: satisfies its Designated Requirement

But I still can't debug using VSCode with g++-9/gdb. It seems when using g++-9 to build, it will generate an application for hello-world.

Now I switch to use clang/lldb to build and debug. Hope VSCode will support documents for how to debug using gdb on macOS.

Thanks,

The "hello-world" would like to access files in your Documents folder comes from the macOS operating system. The terminal program you are using does not permissions to access your file system. You can fix this by giving your terminal access in Security & Privacy -> Privacy -> Files and Folders and click on the checkbox for Terminal.

image

This solution doesn't work for me. Access to Terminal is granted, but the permission popups haven't gone away.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thndrwrks picture thndrwrks  路  3Comments

vicatcu picture vicatcu  路  3Comments

jheinzel picture jheinzel  路  3Comments

wdc596933938 picture wdc596933938  路  3Comments

arl picture arl  路  3Comments