title: How to debug JavaScript in Nashhorn (JDK 8+) in Netbeans?
body: <p>I saw that latest <a href="https://netbeans.org/community/releases/80/" rel="nofollow noreferrer">Netbeans 8.0 beta</a> offers a way to debug "JavaScript code executed in Nashorn" (see attached file)</p>
  
  <p><img src="https://i.stack.imgur.com/n28Lt.jpg" alt="enter image description here"></p>
  
  <p>What are the steps to see this in action?</p>
  
  <p><strong>[UPDATE]</strong>
  I was able to run a simple JavaScript file <strong>only</strong> by opening the file (outside any project), click inside the file, right click and then select Run File option.</p>
  
  <p><img src="https://i.stack.imgur.com/lNKpU.jpg" alt="enter image description here"></p>
  
  <p>I need to mention that the shortcut "Shift-F6" did not worked for me.</p>
  
  <p>So if anybody else knows about a different way to run this please post your solution.</p>
  
  <p><strong>[UPDATE 2]</strong>
  A new article on <a href="http://www.infoq.com/articles/nashorn" rel="nofollow noreferrer">JavaScript Nashorn</a> mention about JavaScript debug in Netbeans</p>
  
  <p><strong>[UPDATE 3]</strong>
  It seems that Nashhorn will be deprecated inside JDK. See <a href="https://openjdk.java.net/jeps/335" rel="nofollow noreferrer">JEP 335: Deprecate the Nashorn JavaScript Engine</a></p>