Open
Description
Bug type: General
- OS and Version: macOS 11.2.3
- VS Code Version: 1.59.1
- C/C++ Extension Version: 1.6.0
After updating to 1.6.0 of this extension the cwd option stopped working for all of my launch.json configs. Example config:
{
"name": "TEST",
"request": "launch",
"type": "cppdbg",
"program": "/tmp/a.out",
"args": [""],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/components/Media/",
"environment": [
//{"name": "ASAN_OPTIONS", "value": "detect_container_overflow=0"} // Uncomment when using address sanitizier
],
"externalConsole": false,
"MIMode": "lldb"
},
To verify I created a test program like:
#include <unistd.h>
#include <iostream>
int main()
{
char a[2048];
getcwd(a, 2048);
std::cout << a << std::endl;
}
which on 1.6.0 prints the incorrect "/private/tmp" when launching through vscode. If I manually downgrade to 1.5.1 I get the expected output (the actual cwd specified in the launch.json file).