[haXe] Debugger Request.

hank williams hank777 at gmail.com
Tue Aug 22 14:51:26 CEST 2006


On 8/22/06, Nicolas Cannasse <ncannasse at motion-twin.com> wrote:
> > Hi There,
> >
> > I am just work back with Flash because some Libraries that I use are not
> > haxefied yet. But anyway: I thought about debugging in another
> > environment. I mean: theoretically haXe could add for debugging
> > "breakpoint" functions after each call that can "pause" the execution
> > ... It would be a lot slower but at least usable with javascript etc.
> > too... Might be a bit tricky but worth a try ... at least since I hope
> > to finally switch all my daily work to haXe I would love to see a
> > debugger for all environments available for haXe.
> >
> > yours
> > Martin.
>
> I have no immediate plans for a debugger, however here are the
> feasability by platform :
>
> - on Neko, things are pretty simple. A specific version of the VM could
> be built that connects to a remote debugger and send informations about
> stack and globals. Not so much changes needed.
>
> - in Flash, now that the Flash Debug Player is freely available for
> download as part of the Flex2 SDK, it would be interesting to resume the
> work made on OFD (http://osflash.org/ofd). If someone can come up with a
> working prototype of an OS Flash9 debugger then I will add SWD output to
> haXe (btw is there flash9 swd ??)
>
> - in JS this is pretty hackish, since to "break" the program execution,
> the only possibility is to perform a synchronous HTTP request. I have an
> idea on how that could be done but this also require some important work.
>
> The value of a debugger decrease partly of the quality of exceptions
> reports you get. Now that both Flash9 and Neko can get complete stack
> trace on exceptions, with planned supported for Flash<=8 and JS as well,
> the amount of work needed to develop a debugger does not match its
> usefulness.

This is just wrong. If it were true that the value of a debugger
doesnt match the effort then the zillions of other languages that have
debuggers wouldnt have them, because it wouldnt be worth it.

I almost feel silly responding to this. You are so smart Nicolas, and
this is so off base that I dont know what to say without insulting
your intelligence. But I will say it, given that you perhaps have just
forgotten what the process of programming is like for most people. If
all debugging constituted was waiting for an exception and then trying
to figure out how things got there, perhaps what you are saying would
have some merit. But there is so much more to debugging, and stack
traces, while nice, only provide a small window into what is going on.

One of the most significant benefits to a debugger is when stepping
through code where you are using libraries that are new to you. Being
able to explore variables and functions that are hierarchically nested
at run time is incredibly valuable. For example I am learning the Flex
framework, and being able to explore the variables and their types in
the debugger has allowed me to do and understand things that would not
be practical without it.

Breakpoints are also incredibly valuable. You want to see what
variables look just before an event happens. And stack traces do not
allow you to see the full hierarchy of variables. so stack traces for
most debugging in a hierarchical environment like flex or any modern
framework are useless.

But I feel a bit silly making these arguments. You are basically
saying that fundamental tools that programmers have used for twenty
plus years have somehow become less valuable because you can get a
stack trace at an exception. You are saying that somehow haXe is so
special that it doesnt need what other modern languages have, and what
is *universally* accepted as a core programming tool. I dont get it.

By the way. I am not suggesting a debugger for JS. That is likely
impossible. But for Neko and Flash 9+ it is totally doable. For flash,
you are expecting people to give up a totally modern kick ass IDE
debugger, environment and framework, for some improved (though very
similar) language syntax?

Its fine if you dont want to do write a debugger, or it isnt within
your core skill set. Or you dont have the time. That is your
perogative. But dont say its because since we have stack traces we
dont need a debugger. Its silly.

Regards
Hank



More information about the Haxe mailing list