Is it possible to use a gdb-like debugger to debug dart programs on the terminal, or is the only debugger available the one packaged with the Dart Editor?
To activate the debugger at the command prompt In the Session List window, do one of the following: Choose Debug Next. The debugger is now active and is waiting to attach to a session. Select a session, and then choose Debug.
Run the app To run the app from the command line, use the Dart VM by running the dart run command in the app's top directory: $ cd cli $ dart run Hello world: 42!
update
As far as I remember, this was only experimental and was removed quite some time ago.
The Dart VM has a service API and provides a browser UI (Observatory) to debug a running VM instance.
This service API can also be used to build custom debugger interfaces but the Dart SDK doesn't provide one out-of-the-box.
original
This blog post is a bit outdated but maybe it still contains some information that help to figure out how to debug on the command line.
http://financecoding.blogspot.co.at/2012/05/first-steps-to-dart-debugging.html
When you start a dart application with the --debug
flat the Dart VM listens on 127.0.0.1:5858
for debug commands
dart --debug myapp.dart
telnet 127.0.0.1 5858 # on another console
But it seems to expect commands in JSON format and I couldn't find the ddbg
command mentioned in the blog.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With