rigamonk
rigamonk

Reputation: 1181

Create a Debugging IDE for proprietary language

I am using a rather obsure, proprietary langauge called WIL/Winbatch that had an awful IDE (winbatch studio).

I would like to develop an alternative environment; however, without the ability to set breakpoints, step, and examine variables, there is really no point. How does one begin even researching how to implementing a debugger for a proprietary language? Is it even legal? I guess I'm kind of locked in a mindset that the debugger portion must be able to examine the statements that are provided to it in WIL as they are executed, right? So somehow i have to trap the output of the interpreter? Or is it just a matter of reading locations in memory using whatever language? Thanks in advance.

Upvotes: 2

Views: 385

Answers (2)

Michael Mior
Michael Mior

Reputation: 28752

Why are you tied so closely to this language? If it's not well supported, there are many others you can use. Anyway, to actually answer your question, the difficulty depends on whether it is a compiled or interpreted language and whether or not you have access to any source code (which it seems of course, that you don't). That said, this would be a very challenging project as you would have to reverse engineer the compiled code for it to have any meaning. Your time would be better spent learning another (better) language.

Perhaps if you can give us an idea of why you want to use this language we could give you some help?

Upvotes: 1

Sam Harwell
Sam Harwell

Reputation: 99949

Having been there and successfully completed the task, here are the things to keep in mind:

  1. Build it as a plug-in/extension to an IDE your team is already familiar with and likes. They'll thank you for providing an interface consistent with what they really know how to use, plus you can focus entirely on the features that make your language different from others.
  2. You'll have to learn the debugging protocol for your language. In our case, we had source access to the runtime for the interpreted language. In other cases, you may find documentation for GDB local or remote debugging interface, a library you can link to for the language's debugging protocols, or maybe even figure out what the call stacks look like and wrap the Windows Debugging API to analyze it behind the scenes.
  3. Don't build in excess of what the language provides. Adding debugging features takes a lot of time, and they have a rather annoying habit of needing to be significantly altered or completely rewritten as versions of the target language are updated.

Upvotes: 2

Related Questions