<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic FYI: in Analyzers</title>
    <link>https://community.intel.com/t5/Analyzers/Local-debugger-environment-problem/m-p/1064197#M14808</link>
    <description>&lt;P&gt;FYI:&lt;/P&gt;

&lt;P&gt;Original problem is observed on MSVS2010+Amplifier XE 2013 (Update 16). Attached screenshots are obtained on MSVS2013+Amplifier XE 2013 (Update 16)&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Feb 2016 06:28:05 GMT</pubDate>
    <dc:creator>Alexander_M_2</dc:creator>
    <dc:date>2016-02-09T06:28:05Z</dc:date>
    <item>
      <title>Local debugger environment problem</title>
      <link>https://community.intel.com/t5/Analyzers/Local-debugger-environment-problem/m-p/1064194#M14805</link>
      <description>&lt;P&gt;I am trying to run Amplifier from MSVS with included Inheritance&amp;nbsp;of the project properties.&lt;/P&gt;

&lt;P&gt;My sample is quite easy:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif

#include &amp;lt;iostream&amp;gt;
#include &amp;lt;cstdlib&amp;gt;
#include &amp;lt;string&amp;gt;
using namespace std;

int main()
{
  // Variable 1.
  string anEnv1 = getenv("ENV1");
  if (anEnv1.size() != 0)
    cout &amp;lt;&amp;lt; anEnv1 &amp;lt;&amp;lt; endl;
  else
    cout &amp;lt;&amp;lt; "ENV1 read problem" &amp;lt;&amp;lt; endl;

  // Variable 2.
  string anEnv2 = getenv("ENV2");
  if (anEnv2.size() != 0)
    cout &amp;lt;&amp;lt; anEnv2 &amp;lt;&amp;lt; endl;
  else
    cout &amp;lt;&amp;lt; "ENV2 read problem" &amp;lt;&amp;lt; endl;
}&lt;/PRE&gt;

&lt;P&gt;I set these variables in "Project-&amp;gt;properties-&amp;gt;debugging-&amp;gt;Environment" via visual studio. So this example works in standalone mode. When I try to use Amplifier behaviour is incorrect.&lt;/P&gt;

&lt;P&gt;Physically this variables are stored in vcproj.user file which can be obtained after cmake execution. Here are this lines:&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;lt;LocalDebuggerEnvironment&amp;gt;ENV1=D:/ENV1DIR&lt;BR /&gt;
	ENV2=D:/ENV2DIR&lt;BR /&gt;
	$(LocalDebuggerEnvironment)&amp;lt;/LocalDebuggerEnvironment&amp;gt;&lt;/P&gt;

&lt;P&gt;I can provide full sample in case of necessity.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2016 16:42:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Local-debugger-environment-problem/m-p/1064194#M14805</guid>
      <dc:creator>Alexander_M_2</dc:creator>
      <dc:date>2016-02-08T16:42:57Z</dc:date>
    </item>
    <item>
      <title>Hi Alexander:</title>
      <link>https://community.intel.com/t5/Analyzers/Local-debugger-environment-problem/m-p/1064195#M14806</link>
      <description>&lt;P&gt;Hi Alexander:&lt;/P&gt;

&lt;P&gt;I can't even get it to work without VTune Amplifier! &amp;nbsp;When I attempt to run your sample under the debugger, I receive a debug assertion because getenv() returns a null pointer.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="envAssert.PNG"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/8481i86810403291C3C41/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="envAssert.PNG" alt="envAssert.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I've set my debugger environment as follows:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="envStrings.PNG"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/8482iF0D4C199E7F44ADB/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="envStrings.PNG" alt="envStrings.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I've tried with and without semi-colons - no difference in behavior. &amp;nbsp;If I replace "ENV1" with "TEMP", then I am able to retrieve the system variable. &amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;What am I missing? :\&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2016 18:11:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Local-debugger-environment-problem/m-p/1064195#M14806</guid>
      <dc:creator>David_A_Intel1</dc:creator>
      <dc:date>2016-02-08T18:11:34Z</dc:date>
    </item>
    <item>
      <title>Hello MrAnderson!</title>
      <link>https://community.intel.com/t5/Analyzers/Local-debugger-environment-problem/m-p/1064196#M14807</link>
      <description>&lt;P&gt;Hello MrAnderson!&lt;/P&gt;

&lt;DIV id="status"&gt;&lt;IMG alt="" src="https://software.intel.com/file/493290/download" /&gt;&lt;/DIV&gt;

&lt;P&gt;&lt;IMG alt="" src="https://software.intel.com//file/493291/download" /&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Why there are 4 variables?&lt;/P&gt;

&lt;P&gt;On my original case inheritance lead to situation when one of the variables became &lt;SPAN class="short_text" id="result_box" lang="en"&gt;&lt;SPAN class="hps"&gt;unavailable and application profiling crash.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2016 04:47:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Local-debugger-environment-problem/m-p/1064196#M14807</guid>
      <dc:creator>Alexander_M_2</dc:creator>
      <dc:date>2016-02-09T04:47:44Z</dc:date>
    </item>
    <item>
      <title>FYI:</title>
      <link>https://community.intel.com/t5/Analyzers/Local-debugger-environment-problem/m-p/1064197#M14808</link>
      <description>&lt;P&gt;FYI:&lt;/P&gt;

&lt;P&gt;Original problem is observed on MSVS2010+Amplifier XE 2013 (Update 16). Attached screenshots are obtained on MSVS2013+Amplifier XE 2013 (Update 16)&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2016 06:28:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Local-debugger-environment-problem/m-p/1064197#M14808</guid>
      <dc:creator>Alexander_M_2</dc:creator>
      <dc:date>2016-02-09T06:28:05Z</dc:date>
    </item>
    <item>
      <title>Okay, thank you.  I am seeing</title>
      <link>https://community.intel.com/t5/Analyzers/Local-debugger-environment-problem/m-p/1064198#M14809</link>
      <description>&lt;P&gt;Okay, thank you. &amp;nbsp;I am seeing some strange behavior, as well, and have reported this to the development team.&lt;/P&gt;

&lt;P&gt;The workaround for you would be to define these variables in the environment that you start Visual Studio from. &amp;nbsp;For example, if you open a command prompt, set the variables, start devenv, then VTune Amplifier as well as your app will inherit those variables from the command prompt.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2016 18:36:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Local-debugger-environment-problem/m-p/1064198#M14809</guid>
      <dc:creator>David_A_Intel1</dc:creator>
      <dc:date>2016-02-09T18:36:34Z</dc:date>
    </item>
    <item>
      <title>Hi MrAnderson,</title>
      <link>https://community.intel.com/t5/Analyzers/Local-debugger-environment-problem/m-p/1064199#M14810</link>
      <description>&lt;P&gt;Hi MrAnderson,&lt;/P&gt;

&lt;P&gt;I've used this workaround and confirm that it is work.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 07:46:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Local-debugger-environment-problem/m-p/1064199#M14810</guid>
      <dc:creator>Alexander_M_2</dc:creator>
      <dc:date>2016-02-10T07:46:32Z</dc:date>
    </item>
    <item>
      <title>Hi Alexander:</title>
      <link>https://community.intel.com/t5/Analyzers/Local-debugger-environment-problem/m-p/1064200#M14811</link>
      <description>&lt;P&gt;Hi Alexander:&lt;/P&gt;

&lt;P&gt;I have an update. &amp;nbsp;This is something peculiar about the Visual Studio* project settings. &amp;nbsp;When you open the project settings, you need to make sure the "Configuration" where you are defining the variables *matches* the one that you are executing:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="evnvStringsSolution.PNG"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/8484iE1241BF8FCD9460C/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="evnvStringsSolution.PNG" alt="evnvStringsSolution.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Once I changed "Release" to "Active(Debug)" and set the variables, everything worked!!&lt;/P&gt;

&lt;P&gt;This oddity of Visual Studio has bitten me before. :( &amp;nbsp;Hope that helps.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 23:08:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Local-debugger-environment-problem/m-p/1064200#M14811</guid>
      <dc:creator>David_A_Intel1</dc:creator>
      <dc:date>2016-02-29T23:08:32Z</dc:date>
    </item>
  </channel>
</rss>

