<?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 Quote:app4619 wrote: in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937815#M89279</link>
    <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;app4619 wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;launch the app1.exe as a visual studio debug session from the bat file.&lt;/P&gt;

&lt;P&gt;see&amp;nbsp;&lt;A href="http://msdn.microsoft.com/en-us/library/xee0c8y7.aspx"&gt;http://msdn.microsoft.com/en-us/library/xee0c8y7.aspx&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks for your fast&amp;nbsp;answer.&lt;/P&gt;

&lt;P&gt;However, this solution&amp;nbsp;does not seem to be what I'm looking for.&lt;/P&gt;

&lt;P&gt;First, the .bat file must be modified, which, in my case, is not acceptable (indeed, I would have&amp;nbsp;to modify many .bat files). Anyway, as you suggested,&amp;nbsp;I tried to launch the application as a VS debug session from the .bat file&amp;nbsp;(I used the following command: devenv /debugexe app1.exe). I may be wrong, but it seems that&amp;nbsp;this command creates a new solution in MVS (app1.sln) which just&amp;nbsp;includes the executable, without the source code. So it is not possible to use the traditional debugging tools (breakpoints, etc.).&lt;/P&gt;

&lt;P&gt;I was rather looking for a way to automatically attach the debugger&amp;nbsp;as soon as&amp;nbsp;the application starts.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; Marc&lt;/P&gt;</description>
    <pubDate>Thu, 06 Mar 2014 09:53:53 GMT</pubDate>
    <dc:creator>Marc_G_</dc:creator>
    <dc:date>2014-03-06T09:53:53Z</dc:date>
    <item>
      <title>Is it possible to automate the "Attach to Process" tool?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937812#M89276</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am using Intel Composer XE 2013 under MVS 2010. I have built a Solution with CMake in Debug mode. The solution is made up of several Fortran projects (say, app1.exe, app2.exe, ...).&amp;nbsp;CMake also creates a&amp;nbsp;VC++ project, RUN_TESTS, which mainly calls a .bat script (that I wrote by myself)&amp;nbsp;where the applications are run in&amp;nbsp;some predefined order (for instance, app1 is run, then app2, then app3, ...). When RUN_TESTS is launched, the calculations are correctly performed in each application and everything works fine. The problem comes when I want to attach the debugger to&amp;nbsp;an application.&amp;nbsp;For instance, let's consider that&amp;nbsp;some breakpoints are added to the source code in app1. The procedure I am using is as follows: (1) Launch RUN_TESTS; (2) Go to &amp;nbsp;Debug &amp;gt; Attach to Process; (3) Select "app1.exe" from the list of the running processes and Attach. The symbols are loaded and the first breakpoint is correctly hit, thus allowing a debugging process. But what if&amp;nbsp;app1 is running too fast? The debugger cannot be attached to it (app1 is no more displayed&amp;nbsp;in the list of the running processes)... Is it possible to automate in some way the attachment process? I could consider the option of slowing down the application (by adding&amp;nbsp;some loop at the beginning of the code), but this&amp;nbsp;solution is not really satisfactory.&lt;/P&gt;

&lt;P&gt;Thank you very much for your suggestions.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Marc&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 17:15:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937812#M89276</guid>
      <dc:creator>Marc_G_</dc:creator>
      <dc:date>2014-03-05T17:15:50Z</dc:date>
    </item>
    <item>
      <title>launch the app1.exe as a</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937813#M89277</link>
      <description>&lt;P&gt;launch the app1.exe as a visual studio debug session from the bat file.&lt;/P&gt;

&lt;P&gt;see&amp;nbsp;http://msdn.microsoft.com/en-us/library/xee0c8y7.aspx&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 18:40:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937813#M89277</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2014-03-05T18:40:16Z</dc:date>
    </item>
    <item>
      <title>A colleague recently sent me</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937814#M89278</link>
      <description>&lt;P&gt;A colleague recently sent me the following. It may help.&lt;/P&gt;

&lt;P&gt;"In the past I have found it useful to use macros that attach to the running&amp;nbsp;executable but that wasn't possible after VS macros were dropped in 2012.&lt;/P&gt;

&lt;P&gt;However, I have found a useful VS extension called ReAttach that is a useful time-saver.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://visualstudiogallery.msdn.microsoft.com/8cccc206-b9de-42ef-8f5a-160ad0f017ae"&gt;&lt;U&gt;&lt;/U&gt;&lt;/A&gt;&lt;A href="http://visualstudiogallery.msdn.microsoft.com/8cccc206-b9de-42ef-8f5a-160ad0f017ae" target="_blank"&gt;http://visualstudiogallery.msdn.microsoft.com/8cccc206-b9de-42ef-8f5a-160ad0f017ae&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It provides a button on the toolbar that does the same job as the macro I had, although it won't be looking for any&amp;nbsp;specific program&amp;nbsp;like the macro. If you are working with multiple&amp;nbsp;executables you'll probably have to select which one. I think the button starts the last one attached to and the dropdown provides a choice of previous ones. Either way though, it is a lot better than using the standard attach to process dialog.&lt;/P&gt;

&lt;P&gt;If you install it, to get it set up just attach to&amp;nbsp;your&amp;nbsp;executable&amp;nbsp;the old way then stop debugging. After that you will see that the button is live and you can re-attach with one click."&lt;/P&gt;

&lt;P&gt;Les&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 08:02:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937814#M89278</guid>
      <dc:creator>Les_Neilson</dc:creator>
      <dc:date>2014-03-06T08:02:00Z</dc:date>
    </item>
    <item>
      <title>Quote:app4619 wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937815#M89279</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;app4619 wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;launch the app1.exe as a visual studio debug session from the bat file.&lt;/P&gt;

&lt;P&gt;see&amp;nbsp;&lt;A href="http://msdn.microsoft.com/en-us/library/xee0c8y7.aspx"&gt;http://msdn.microsoft.com/en-us/library/xee0c8y7.aspx&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks for your fast&amp;nbsp;answer.&lt;/P&gt;

&lt;P&gt;However, this solution&amp;nbsp;does not seem to be what I'm looking for.&lt;/P&gt;

&lt;P&gt;First, the .bat file must be modified, which, in my case, is not acceptable (indeed, I would have&amp;nbsp;to modify many .bat files). Anyway, as you suggested,&amp;nbsp;I tried to launch the application as a VS debug session from the .bat file&amp;nbsp;(I used the following command: devenv /debugexe app1.exe). I may be wrong, but it seems that&amp;nbsp;this command creates a new solution in MVS (app1.sln) which just&amp;nbsp;includes the executable, without the source code. So it is not possible to use the traditional debugging tools (breakpoints, etc.).&lt;/P&gt;

&lt;P&gt;I was rather looking for a way to automatically attach the debugger&amp;nbsp;as soon as&amp;nbsp;the application starts.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; Marc&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 09:53:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937815#M89279</guid>
      <dc:creator>Marc_G_</dc:creator>
      <dc:date>2014-03-06T09:53:53Z</dc:date>
    </item>
    <item>
      <title>Quote:Les Neilson wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937816#M89280</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Les Neilson wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;A colleague recently sent me the following. It may help.&lt;/P&gt;

&lt;P&gt;"In the past I have found it useful to use macros that attach to the running&amp;nbsp;executable but that wasn't possible after VS macros were dropped in 2012.&lt;/P&gt;

&lt;P&gt;However, I have found a useful VS extension called ReAttach that is a useful time-saver.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://visualstudiogallery.msdn.microsoft.com/8cccc206-b9de-42ef-8f5a-160ad0f017ae" rel="nofollow"&gt;http://visualstudiogallery.msdn.microsoft.com/8cccc206-b9de-42ef-8f5a-160ad0f017ae&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It provides a button on the toolbar that does the same job as the macro I had, although it won't be looking for any&amp;nbsp;specific program&amp;nbsp;like the macro. If you are working with multiple&amp;nbsp;executables you'll probably have to select which one. I think the button starts the last one attached to and the dropdown provides a choice of previous ones. Either way though, it is a lot better than using the standard attach to process dialog.&lt;/P&gt;

&lt;P&gt;If you install it, to get it set up just attach to&amp;nbsp;your&amp;nbsp;executable&amp;nbsp;the old way then stop debugging. After that you will see that the button is live and you can re-attach with one click."&lt;/P&gt;

&lt;P&gt;Les&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Thanks for your answer.&lt;/P&gt;

&lt;P&gt;This tool is indeed very useful. However, you must first be able to attach to the application the old way (i.e. with the classical "Attach to Process"). In my case, this is not possible because the application is running too fast (it is no more in the list of the running processes when I try to attach it).&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; Marc&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 10:00:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937816#M89280</guid>
      <dc:creator>Marc_G_</dc:creator>
      <dc:date>2014-03-06T10:00:48Z</dc:date>
    </item>
    <item>
      <title>If your exe has a console you</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937817#M89281</link>
      <description>&lt;P&gt;If your exe has a console you can use the pause statement. Press enter after attached. Otherwise use some kind of timed delay loop to give you enough time to attach&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 10:18:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937817#M89281</guid>
      <dc:creator>Andrew_Smith</dc:creator>
      <dc:date>2014-03-06T10:18:30Z</dc:date>
    </item>
    <item>
      <title>Quote:Andrew Smith wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937818#M89282</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Andrew Smith wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;If your exe has a console you can use the pause statement. Press enter after attached. Otherwise use some kind of timed delay loop to give you enough time to attach&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;

&lt;P&gt;Yes, this is actually what I'm doing as a workaround. However, I would like to avoid modifying the code. Maybe I am too demanding...&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 10:49:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937818#M89282</guid>
      <dc:creator>Marc_G_</dc:creator>
      <dc:date>2014-03-06T10:49:32Z</dc:date>
    </item>
    <item>
      <title>Perhaps:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937819#M89283</link>
      <description>&lt;P&gt;Perhaps:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/jj919165.aspx#BKMK_Start_multiple_processes_in_a_VS_solution__attach_to_a_process__automatically_start_a_process_in_the_debugger" target="_blank"&gt;http://msdn.microsoft.com/en-us/library/jj919165.aspx#BKMK_Start_multiple_processes_in_a_VS_solution__attach_to_a_process__automatically_start_a_process_in_the_debugger&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 11:17:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937819#M89283</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2014-03-06T11:17:40Z</dc:date>
    </item>
    <item>
      <title>Some applications can not be</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937820#M89284</link>
      <description>&lt;P&gt;Some applications can not be started by Visual Studio and therefore attaching is the only option.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 13:12:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937820#M89284</guid>
      <dc:creator>Andrew_Smith</dc:creator>
      <dc:date>2014-03-06T13:12:41Z</dc:date>
    </item>
    <item>
      <title>As Les pointed out, ReAttach</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937821#M89285</link>
      <description>&lt;P&gt;As Les pointed out, ReAttach is a good program.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;But it needs some time to attach. So if you want to check the first lines of your code, you´ll need to get creative like a pause statement or something like that.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Markus&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 13:38:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937821#M89285</guid>
      <dc:creator>onkelhotte</dc:creator>
      <dc:date>2014-03-06T13:38:21Z</dc:date>
    </item>
    <item>
      <title>Quote:app4619 wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937822#M89286</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;app4619 wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Perhaps:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/jj919165.aspx#BKMK_Start_multiple_processes_in_a_VS_solution__attach_to_a_process__automatically_start_a_process_in_the_debugger"&gt;http://msdn.microsoft.com/en-us/library/jj919165.aspx#BKMK_Start_multipl...&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Thank you. I've just tried the procedure described to launch the debugger automatically. The good point is that the debugger can indeed be attached to a fast running process (the breakpoints are correctly hit). There are two bad points however (sorry, I'm never satisfied...). First, it seems that&amp;nbsp;you can only mention a generic application name in the registry ("app1.exe"), so that the debugger will try to attach whatever application is run (I have many different Solutions including an "app1.exe"). Second, the application called from the .bat file&amp;nbsp;is followed by&amp;nbsp;a "&amp;lt;" redirection operator (the command I'm using is similar to: %ComSpec% /C app1.exe &amp;lt; input_file.txt): unfortunately, this operator is no more active when the debugger opens.&lt;/P&gt;

&lt;P&gt;Do you know if it is possible to&amp;nbsp;define a specific application (for instance: d:\full\path\to\specific\project\bin\debug\app1.exe) as a key in the registry? This would allow to restrict the attachment process to a specific application.&lt;/P&gt;

&lt;P&gt;Thanks again for your help.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 13:53:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937822#M89286</guid>
      <dc:creator>Marc_G_</dc:creator>
      <dc:date>2014-03-06T13:53:53Z</dc:date>
    </item>
    <item>
      <title> you won't like this either..</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937823#M89287</link>
      <description>&lt;P&gt;&amp;nbsp;you won't like this either....&lt;/P&gt;

&lt;P&gt;You can set a registry key from a batch file using &lt;STRONG&gt;reg add "HKEY......&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 15:12:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Is-it-possible-to-automate-the-quot-Attach-to-Process-quot-tool/m-p/937823#M89287</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2014-03-06T15:12:18Z</dc:date>
    </item>
  </channel>
</rss>

