microsoft / microsoft/vscode-cpptools

Included mono libraries interfere with applications that embed mono/xamarin.mac

Open
#6,682 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug debugger
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.