title: Dart how to drop a breakpoint or debugger
body: <p>In Python, I can insert a <code>breakpoint()</code> keyword on any line of code, and when I run the script from the command-line, it will stop when it reaches that line, and I'll have an opportunity to interact with or access any previously-defined variables.
  I was looking for a way to do this in the Dart language but so far without success. </p>
  
  <p>I've seen references to the <code>debugger</code> keyword provided by the <code>dart:developer</code> library, but instead of allowing me to interact, the script just hangs:</p>
  
  <pre><code>// bin/my_script.dart
  
  import "dart:developer"; // source of debugger();
  
  main() {
    var x = 5;
    print("X: ${x}"); //&gt; X: 5
  
    debugger(); // ... just hangs
  
    print("END");
  }
  </code></pre>
  
  <p>I've also seen references to the <code>console</code> package, but I'm not seeing it do anything:</p>
  
  <pre><code>// bin/my_script.dart
  
  import "package:console/console.dart"; // source of Console.init()
  
  main() {
    var x = 5;
    print("X: ${x}"); //&gt; X: 5
  
    Console.init(); // ... nothing happens
  
    print("END");
  }
  </code></pre>
  
  <p>FYI: I'm running this script via <code>dart bin/my_script.dart</code>, and a command-line solution would be ideal, but a solution using the VS Code text editor would also be sufficient.</p>