Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<ul> <li>Since it was hitting the deadline there was no time to wrap C++ with managed code as suggested by Wilbert. </li> <li>Running the two programs on separate VS also doesn't work ( confirmed by trying out ) since program <strong>B</strong> is run only when necessary by the program <strong>A</strong> and each time <strong>command line arguments</strong> for starting <strong>B</strong> were different and <strong>generated at run-time</strong>. ( cannot be done even in same VS since debugging one process seems to pause execution of the other process )</li> <li>Calling Debug in the program is not possible since <strong>B</strong> is a native C++ application. To access visual studio extensions, the project needs to be a managed project. Converting the current project to managed was not possible due to a problem with my version of VS. ( after installing Net Framework 4.5, VS 2010 needs to be updated to SP1 to be able to work use some features )</li> </ul> <p>Applied Solution:<br/></p> <ol> <li><p>In source of <strong>A</strong> , put a break-point below the place where command line arguments are generated for <strong>B</strong> (I put it at where <code>proc.Start()</code> is called).<br/> e.g.</p> <pre><code>Process otherProcess = new Process(); ... otherProcess.StartInfo.Arguments = "abc" + foo() + "," + bar();// what we need ... otherProcess.Start(); // break-point is here </code></pre></li> <li><p>Run <strong>A</strong> in debug mode until the break-point is reached.</p></li> <li>Read the value of <code>proc.StartInfo.Arguments</code> and copy the value for later usage.</li> <li>Safely exit debugging <strong>A</strong> (stop debugging).</li> <li>Set command line arguments of <strong>B</strong> as the copied values (Project Properties > Debugging > Command Line Arguments)</li> <li>Start debugging <strong>B</strong> (right click on project > debug > start a new instance).</li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload