<div dir="ltr">In particular this code:<div><br></div><div><div>    error = LaunchProcess (launch_info);</div><div>    if (error.Success())</div><div>    {</div><div>        if (log)</div><div>            log->Printf ("Platform::%s LaunchProcess() call succeeded (pid=%" PRIu64 ")", __FUNCTION__, launch_info.GetProcessID ());</div><div>        if (launch_info.GetProcessID() != LLDB_INVALID_PROCESS_ID)</div><div>        {</div><div>            ProcessAttachInfo attach_info (launch_info);</div><div>            process_sp = Attach (attach_info, debugger, target, error);</div></div><div><br></div><div>For Windows if you want to launch a program under the debugger the method you use launch to launch the process also does the attach at the same time.  Until recently, PlatformWindows::CanDebugProcess() had been returning false, so it was falling back to calling Process::DoLaunch(), which has been working fine.</div><div><br></div><div>I'm adding support for attaching to processes though, and this requires changing that function to return true.  So now both launches and attaches go through this path of launching first, and then attaching, which causes the launch codepath to break.</div><div><br></div><div>What is the correct way to handle this?  Could I add a method to Platform called SupportsAtomicLaunchAndAttach() that if true will just call Process::DoLaunch() directly, and if false will continue down the existing codepath?</div></div>