views:

97

answers:

4

I've recently been implementing my own programming language, mostly to get a feel for what it takes and hopefully to understand quirks of other languages better. I've mostly finished the language itself, so, since I like this project, I'd like to write some development tools for it. What tools would you consider indispensable?

For now, I've got a debugger, profiler, and editor support (i.e. vim syntax highlighting; I'd to Emacs, but I can't for the life of me get their documentation). I might write a plugin for an IDE as well, probably for MonoDevelop (Eclipse documentation scared me). What else is absolutely necessary for you to consider using a language?

Also, what features are critical in a debugger? The basic one I have now does little more than tell you what line you're on and drop you into an interpreter shell. What else does a debugger need to do. (For those who want to ask, I don't usually use IDEs or debuggers, so I have no idea what cool features I'm missing out on).

It's a very dynamic language (think Python or Javascript) so things like a compiler or Valgrind-like memory leak analyzer are irrelevant.

Note: I'm specifically not talking about language features here. Whether polymorphic typing or coroutines are indispensable isn't my question. I'm asking, for example, about a debugger and a profiler.

+1  A: 

For the debugger I like conditional breakpoints. They allow me to only to break into a tight loop when there's conditions I care about. Watches are also indispensable. If I get dropped into an interpreter every time and have to interrogate the objects myself that's going to be a real drag.

Jason Punyon
Conditional breakpoints are done in a "creative" way -- the debugging statements are part of the language and are executed at runtime. So you can choose to drop to debugger every time you get a 404 come in over the wire, if you so with. Or, say, every time your index is a prime number (granted, that would make your loop very slow).
pavpanchekha
As for watches, I imagine I'll build a nice GUI for it eventually.
pavpanchekha
+2  A: 

I would make sure the debugger could 'watch' variables. This makes it easier to monitor changes to a variable. I would highly recommend a Notepad++ plugin for your language as many people use it for source code editing.

George Edison
+2  A: 

1) Breakpoints (conditional, tracepoints, etc)

2) Watches (Local, manual, etc)

3) Threads states ?

4) Step next, Step in, step out, step over and run to cursor

5) Stack trace ?

Andrew Keith
+1  A: 

I would also add a testing framework. Junit3 had relatively simple code (but was very powerful) and would allow you to check on correctness of many operations.

peter.murray.rust