title: Task.Factory.StartNew() manipulate timings and debug Multiple Tasks execution using TPL
body: <p>i would to understand how to execute series of functions in parallel and be able to debug each..</p>
  
  <p>i am trying to create a console application that will (after being compiled),
  run on server that will execute app via its task schedualer. </p>
  
  <pre><code>    static void Main(string[] args)
      {
          Task.Factory.StartNew(
              // first b. point here (will not "step into")
              () =&gt;
                  doFirstOne().ContinueWith(task =&gt; doSecondOne())
                  ); 
      }
  
      public static IWebDriver AllDayWbDrvr;
      static string extrctdStr = "";
  
      public static void doFirstOne()
      { 
             // &lt;&lt;&lt;&lt;&lt;&lt;&lt;----- brakePoint here  nothing steps in
          SeparatedClass.IeEnginGenerator IeNgn = new SeparatedClass.IeEnginGenerator();
           AllDayWbDrvr = IeNgn.ExtractPageContent(firstUrl....);
  
          var a = AllDayWbDrvr.FindElements(By.Id("anyID"));
          IWebElement IwbElm = IWebDrvRdonlyColl.ElementAt(1).FindElements(By.TagName("td"))[0];
          extrctedStr = IwbElm.Text;
          // plan is to append extracted text to one shared file that will log all results
          string fNm = @"C:\Inetpub\wwwroot\dolarRate.asp";
          File.WriteAllText(fNm, extrctdStr);
  
          AllDWbDrvr.Close();
          IeNgn.service.Dispose();
  
      }
  
  
      public static void doSecondOne()
      {
          SeparatedClass.IeEnginGenerator IeNgn = new SeparatedClass.IeEnginGenerator();
           AllDayWbDrvr = IeNgn.ExtractPageContent("secondURL....");
  
          var a = AllDayWbDrvr.FindElements(By.ClassName("WpBody"));
          IWebElement IwbElm = IeNgn.IWebDrvRdonlyColl.ElementAt(5).FindElements(By.TagName("td"))[1];
          extrctedStr = IwbElm.Text;
          string fNm = @"C:\Inetpub\wwwroot\anyOtherFile.asp";
          File.WriteAllText(fNm, extrctdStr);
  
          AllDWbDrvr.Close();
          IeNgn.service.Dispose();
  
      }
  </code></pre>
  
  <ol>
  <li>is that the way to Thread/concatenate functions ?</li>
  <li>how can i breakinto excuted doFirst() &amp; doScond() code ?</li>
  </ol>