Debugging a Visual Basic like language in VBA  (Excel/ Word 2003)

Posted on 2005-04-09
Medium Priority
Last Modified: 2011-09-20
I do a lot of development on a program (PSBasic)  that is similar to Visual Basic but has a slightly different syntax. The development environment for PSBasic is very bad, may be similar to the old DOS basic. I have developed macros that change the code for PSBasic into VBA that can be run and debugged in Excel 2003 VBA. In addition, I use some custom functions declared in VBA and some variable declarations. Once it is debugged, I use another macro to convert back from VBA to PBasic.

Now I want to convert this method to an application. The application will be like an add-in or something similar. It will hide the macros used for converting back and forth from PSBasic to VBA. It will also hide the variable declarations and custom fuctions that I have developed. The user will be able to see the 'converted' code (PSBasic to VBA). Then debug the code as he would a VB Macro and then convert the debugged code back from VBA to PSBasic.

Before I spend a lot of time developing this,I AM LOOKING FOR SOME TIPS TO MAKE THE WHOLE PROCESS BETTER and more user friendly. I am not really worried about the cost of developing this. Only that it should be an excellent application.
One key challenge is that the syntax changing from PSBasic to VBA is difficult i.e. we are replacing on pattern of if..then..else statements with another pattern, etc.

(Please note that PSBasic is not the real name of the program that I use.)
Question by:psms
  • 4
  • 3

Accepted Solution

Mig-O earned 2000 total points
ID: 13743498
I would write my own debugger, using Eclipse Platform. Eclipse is a Platforms that is mainly used for Java, but it has many many plugin possibilities. E.g. the platform debugger can be used to debug any language (I say debuggers for python and C, too).

I think the best possibility is to stop the converter thingy, and write a debugger on your own in Eclipse.

Author Comment

ID: 13743616
Thanks Mig-O. I have never done any programming in C, C++ or Java. The only thing I can manage is VBA and Visual Basic. I have max $500 for development by a third party. When I am selling my application to others, I cannot afford to pay an additional fee per license sold.
In view of this, is Eclipse a realistic solution for me.

Expert Comment

ID: 13743897
no. $500 for development isn't either. (You would get three GUI Forms for that.)
Without java you're not locky enabling the VB-Debugger for your language. Stucked with MS ;)
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 13743936
Thanks Mig-O
So I guess I have to stick with my original solution i.e. VBA/ VB as I descrtibed. Well I have tons of free time, so I think that my best bet would be to just keep on developing on my own.

Can you please clarify the following comment
" Without java you're not locky enabling the VB-Debugger for your language. Stucked with MS ;)"

Pl let me know if you have any good tips for me.

Expert Comment

ID: 13747051
i meant lucky instead of locky. And that if you stay with Microsoft, you have to do as they with (eg. they would never release free tools, that make you build your own languages and debuggers, because they will loose control ... something Microsoft will never accept.

Author Comment

ID: 13747145
Can you please advise if I use eclipse and get it developed by someone who knows java, etc.; how many manhours of effort would be needed to make a fully functional VB like debugger.

Also, would it be really as good as VB debugger. e.g. can I run the code till any statement, pause it there. Then open the Locals window and see the current value of every single variable in the program.


Expert Comment

ID: 13747347
Believe me, doing it right, and the bedugger outperformes VB in any features. Think in manweeks, not hours ;)

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Simple Linear Regression

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question