VSCODE - The good, bad, and the ugly, facts and hacks

158 views
Skip to first unread message

Larry Laswell

unread,
Jun 27, 2020, 11:15:04 PM6/27/20
to OpenQM
I am hoping this post begins a broad discussion on VSCODE, so be aware you are being trolled.

I am beginning a 8 to 10 hour per day year-long development project.  It is important that I get my development environment set up correctly.  This is a challenge since I am new to OpenQm, ACCUTERM and VSCODE, although I have been banging MVBasic through a keyboard since 1993.

VSCODE is a great tool: as powerful as it is complex. This is the editor I have always dreamed of, but it has some rough edges.  From here on out, I consider everything I say to be an opinion. I have spent significant time researching these matters, but a single nugget of knowledge tossed in from cyberspace  and my opinion can be totally invalidated.  That said, here is what I found:

I have installed the MVBasic extention and I am running VSCODE under ACCUTERM 8, my settings are shown below:

a.  The linter does not understand the FOR EACH . . . NEXT construct.  It flags everyone of those in my programs. (not a show stopper, just a pain.)
b.  The formater does not understand the TRY - CATCH - END construct.  Every line of code following a TRY - CATCH - END construct is pretty well screwed up.  Since I program in camel case the code is virtually unreadable.  This alone could be a show stopper.  In a similar fashion the formater can't quite figure out CLASS / OBJECTS.
c.  The compiler seems to not understand the SUBR(. .. . . .) call statement.  It throws an error.
d.  Later in my project, I will need a pre-compiler that I will write.  I can not see a way to modify the compile command to accommodate a pre-compiler.
e.  Both ACCUTERM and VSCODE appear to be slowed down.  At times they just appear to hang, and I have to wait several seconds before they wake up. Since I started programming at a terminal (I actually started with punched cards) I have become accustomed to sub-second response time. I am not a keyboard-wizard, but I am pretty fast and having to worry if the software is keeping up with me is troubling - it's one more thing on my mind and the low is interrupted no matter what because I have to keep checking the status of my input.
f.  My program names are also in camel case, however no matter what I do, the workspace always displays program names in upper case.  It is hard to read camel case names in upper case.


I am going to continue to work with VSCODE and iron out this wrinkles. Any knowledge nuggets from the peanut gallery would be appreciated.


Thanx to all,

Larry

MY SETTINGS FOR MVBASIC:

/ AccuTerm VSCode Workspace Template
//
// To change the maximum number of items to list from any file,
// change RestFS.MaxItems. To show items in a dictionary level
// file, change RestFS.SelAttr to 208.
{
  "folders":[{"uri":"RestFS:/","name":"FX"}],
  "extensions":{"recommendations":["mvextensions.mvbasic"]},
  "settings":{
    "files.associations":{"*":"mvbasic"},
    "files.exclude":{
      "**/.git": true,
      "**/.vscode": true,
      "**/node_modules": true,
      "**/pom.xml": true},
    "files.eol":"\n",
    "MVBasic.ServerName":"@83505",
    "MVBasic.Account":"FX",
    "MVBasic.RestPath":"http://localhost:3181/mvsvr/restfs",
    "MVBasic.UseRestFS":true,
    "MVBasic.languageType":"QM",
    "MVBasic.RestFS.AutoConnect":true,
    "MVBasic.RestFS.RestAPI":1,
    "MVBasic.RestFS.MaxItems":250,
    "MVBasic.RestFS.SelAttr":32976,
    "MVBasic.RestFS.CaseSensitive":true,
    "MVBasic.EditFiles":[

    ]
    }
  }
}



Kevin Powick

unread,
Jun 28, 2020, 3:30:27 AM6/28/20
to OpenQM
Hi Larry,

You're right.  The MVBasic extension does not (yet) handle some of the code constructs that you mention.

It's feedback from users that advance the project, so the fastest way to get things added or fixed is to file an issue in the project's github account.


Please create separate issues for each problem you're having, or feature you would like to see.

--
Kevin Powick

Brian Speirs

unread,
Jun 28, 2020, 4:15:21 AM6/28/20
to OpenQM
Hi Larry,

QM has a range of features not found in other MV dialects. It is these features that the VSCODE extensions don't really know about.

My settings in the VSCODE-WORKSPACE-TEMPLATE (in ACCUTERMCTRL) are similar to yours EXCEPT:

  I have updated the 'MvBasic.RestFS.MaxItems' setting to 2000. I found that the workspace did not populate correctly when set at its default value of 250.

  Various settings in my template just have the placeholders that AccuTerm must use (e.g. <ACCOUNT>, <SESSIONID>, and <DIALECT>).

I can't help you on your slowdown issue, but I would suggest reporting it to Accuterm support. Zumasys will be wanting this to be really useful to the MV community.

Cheers,

Brian

Joseba Real de Asua

unread,
Aug 10, 2020, 12:15:11 PM8/10/20
to OpenQM
Hi Larry,

We have already launched a new MvBasic connector. This is part of the mv extension so it will not solve your Linter problems, actually, we use the MV Basic linter and IntelliSense. We are part of the project and we have focused the extension in the connection. You can also call your precompiled. The load is very very fast (of course it depends on the network) but using QM and Linkar in the same windows box it takes less than 5 seconds to load a 50.000 items file.

And you can find new possibilities, for instance, view, create, delete and modify DICTS from VS Code. Generate EQUATES from the dictionary. Share database lines between programmers. Run TCL commands from VSCODE, Launch a terminal session from inside VSCODE to QM.......

Reply all
Reply to author
Forward
0 new messages