Bug 11941 - Cannot pass environment variables when debugging a xamarin.mac app in md
Summary: Cannot pass environment variables when debugging a xamarin.mac app in md
Status: CONFIRMED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Mac Add-in ()
Version: 4.0.8
Hardware: PC Mac OS
: Normal normal
Target Milestone: Future Cycle (TBD)
Assignee: Chris Hamons
URL:
Depends on:
Blocks:
 
Reported: 2013-04-24 13:44 UTC by Zoltan Varga
Modified: 2016-10-13 21:06 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
options ignored in XamMac (84.52 KB, image/png)
2014-03-20 21:01 UTC, Alex M
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 11941 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Zoltan Varga 2013-04-24 13:44:38 UTC
Environment variables set in Project Options/Run/General are ignored when running/debugging xam.mac apps from xs. This makes debugging runtime issues pretty difficult since we cannot ask customers to set env variables to produce more logging output.

To reproduce:
* Set the env variable 'MONO_LOG_LEVEL' to 'debug' in Project Options/Run/General
* Run/Debug the app
* No debug output

Reproduced with:
https://wrench.internalx.com/Wrench/ViewLane.aspx?lane_id=548&host_id=51&revision_id=167871
Comment 1 Miguel de Icaza [MSFT] 2013-05-15 11:17:39 UTC
Michael, can you shed some light into how this is supposed to work?
Comment 2 Mikayla Hutchinson [MSFT] 2013-05-15 20:08:40 UTC
The Mac execution handler needs support for the execution settings.
Comment 3 Miguel de Icaza [MSFT] 2013-05-15 21:23:44 UTC
Michael,

Can you tell me what that is?  Is that a change that we need to make on Monomac/XamMac, or a change that needs to go into the addin?
Comment 4 Alex M 2014-03-20 21:01:36 UTC
Created attachment 6370 [details]
options ignored in XamMac

environment variables are not sent to the app launcher when debugging, in this exemple, the MONO_GC_DEBUG is not set so the GC will have it's default behavior.
Comment 5 Alex M 2014-03-20 21:10:19 UTC
i'd like to add that parameters won't be sent to the program main, instead only something like -psn_0_340051 will be present in the string[] args array.
Comment 6 Sandy Armstrong [MSFT] 2016-01-04 16:45:43 UTC
As Alex mentions, command line parameters are also not passed. Although I get an empty args array in main, not a random argument.
Comment 7 Zoltan Varga 2016-10-13 19:06:37 UTC
Why is this 'enchancement' ? There is a UI, and it doesn't work. At least it should be disabled for xam.mac apps.
Comment 8 Chris Hamons 2016-10-13 21:06:46 UTC
I agree w\ Zoltan.

There is UI and it doesn't work.