5
votes

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?

1

1 Answers

3
votes

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.