eecs280staff / tutorials

Tools and tutorials
https://eecs280staff.github.io/tutorials/
Other
5 stars 4 forks source link

Directions for setting environment variables incorrect for MacOS VSCode with CodeLLDB extension #132

Closed amirkamil closed 10 months ago

amirkamil commented 10 months ago

What Under MacOS, following the directions for setting up the address sanitizer results in an error in VSCode stating that "Property environment is not allowed." Apparently, the CodeLLDB extension requires environment variables to be specified in separate env properties rather than a single environment property.

Where VSCode tutorial, Sanitizers section

Current language

Then, edit the "environment" property in your launch.json. If there’s already an empty "environment": [], replace it. If there isn’t one, add it after the "args" property.

Proposed The fix is to add the following property instead:

"env": {
    "ASAN_OPTIONS": "abort_on_error=1:detect_leaks=0"
},