microsoft / microsoft/vscode-cpptools
Included mono libraries interfere with applications that embed mono/xamarin.mac
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Type: Debugger
Describe the bug
- OS and Version: macOS 11.0.1
- VS Code Version: 1.51.1
- C/C++ Extension Version: 1.1.3
When debugging an application that embeds mono, the MONO_PATH environment variable that is set during debugging in debugAdapters/OpenDebugAD7 causes the application's embedded mono to use the assemblies included in this extension instead of their own. This environment variable should be avoided, or unset before launching the application.
To Reproduce
This is my launch.json:
{
"name": "Launch My App",
"type": "cppdbg",
"request": "launch",
"program": "/path/to/MyApp.app/Contents/MacOS/MyApp",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "lldb",
}
An easy way to avoid this problem I found is to add this line to launch.json, but it should not be necessary:
"environment": [ { "name": "MONO_PATH", "value": "" }]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in debugAdapters/OpenDebugAD7, where MONO_PATH is set during debugging, and inspect how the launch environment is assembled for the launch.json example. Reproduce the macOS case with an application embedding Mono; done means the application no longer uses the extension's assemblies without requiring a MONO_PATH override.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100