title: Unable Debug java selenium TestNG code line by line eclipse
body: <p>I know where my code has issue and I want to do <strong>debug</strong> it line-by-line to understand code flow. I know <strong>F5,F6,F7</strong> and step filter but I am still not able to debug it line by line as I</p>
  
  <p>F7 -step return I get <strong>Source not found</strong>
  I see cursor still on the same line 34</p>
  
  <p>F6 - I again get Source not found
  I see cursor still on the same line 34</p>
  
  <p>to resolve Source not found I issue used 'Step filters' but in vain
  still see new source not found messages and I cant see my execution line by line i.e. where is code going in every line. I can deal with source not found by just going back to my code and ignoring the new source not found window.</p>
  
  <p><strong>I want to see program flow line by line</strong></p>
  
  <pre><code>public class CallUrl {
  WebDriver driver;
  
  @BeforeClass
  public void openBrowser() throws IOException {
      ChromeOptions options = new ChromeOptions();
      options.addArguments("chrome.switches", "--disable-extensions");
   // BREAKPOINT BELOW    
   driver = new ChromeDriver(options);
  }
  
  @AfterClass
  public void cleanup() {
      if (driver != null) {
          driver.quit();
      }
  }
  
  @Test
  public void openURL() throws IOException {
      driver.get("http://newtours.demoaut.com/");
      WebDriverWait myDynamicElement = new WebDriverWait(driver, 30);
      myDynamicElement.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//input[@name='userName']")));
  }
  
  //@Test (dependsOnMethods = "openURL")
  @Test 
  public void loginToTours() throws InterruptedException {
      driver.findElement(By.xpath("//input[@name='userName']")).sendKeys("Tokci");
  }
  
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/yurTC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yurTC.png" alt="enter image description here"></a></p>