article

JS Engine+Debugger (QTScript)

Email
Submitted on: 8/18/2015 10:56:01 AM
By: dzzie  
Level: Intermediate
User Rating: By 2 Users
Compatibility: VB 6.0
Views: 4746
 
     Test project for using the QTScript Javascript engine and debugger UI from VB6. Including ability to integrate with VB form objects and COM controls.


 
				
Here is an experiment I have been playing with.
The QT framework includes its own Javascript engine, QTScript, which supports a debugger protocol. It even includes a full javascript debugger UI built in.
We can use this from VB6 to add javascript and debugging features to our apps.
Just the javascript engine will run about 2mb in dll dependancies. If you want the full debugger interface support too, then add another 10mb. But its pretty easy to use.
The source repository is here:
https://github.com/dzzie/libs/tree/master/qtscript4vb
I have also designed a way to allow it access to VB host objects and arbitrary (host provided) ActiveX objects. The example repo linked above just uses a very basic integration of this feature (the main test here is for the QT integration)
A more comprehensive implementation that allows you to do things like the following is available:
var ts = fso.OpenTextFile(fpath,1); v = ts.ReadAll();alert(v)
Below is a video overview of it and shows it in action:
(set quality to HD for best viewing note the video is a little old and a couple bugs in it have already been fixed)
https://www.youtube.com/watch?v=FM81NBBJu6Q
And spoiler alert..my next post will be for another JS engine + debugger with only 400k runtime dependancy (Duktape JS Engine). Here the debugger is tightly integrated with a native VB6 GUI.
Blog post with more info here.


Other 1 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this article (in the Intermediate category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

7/18/2015 11:17:24 AMdaveCarter

you always do great stuff, thanks man :)
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular article, please click here instead.)
 

To post feedback, first please login.