MapInfo Pro Developers User Group

 View Only
Expand all | Collapse all

MapBasic IDE

  • 1.  MapBasic IDE

    Employee
    Posted 04-04-2019 17:39
    Edited by System 02-24-2023 13:29

    Periodically there are discussions in our community about the MapBasic 'IDE'.

    It is outdated but functional. The MapInfo Pro development team is reluctant to divert our limited resources into developing and maintaining a more modern IDE, which we give away for free.

    Here is a possible approach to remedy this situation.

     

    If we can officially or unofficially support an extension to a full featured IDE, we can give MapBasic developers the kind of tool and development experience they expect and deserve.


    One good choice for this could be Visual Studio Code.

    If is freely available, open source, and highly extensible.

     

    Try out this visual studio code language extension we have created for the mapbasic language.

    Currently it supports syntax highlighting and some snippets along with a build task for compiling and linking.

     

    We would even consider making the language extension as open source to collaborate with our passionate developer community.

    The potential is there for much more. Anyway give it a try to see what you think.

     

    You can get visual studio code here for free:

    https://code.visualstudio.com/download

     

    To install the extension, click on the extensions button on the left and then choose Install From VSIX from the options menu as shown.

     

     

    To use. Open up the folder where your mapbasic application lives.

    For example c:\program files\mapbasic\samples\animator

     

    You should be able to see syntax highlighting and some snippets.

     

    To use the build task, you currently have to copy the tasks.json file from the language install folder into the .vscode folder in your application folder.

    For example copy %USERPROFILE%\.vscode\extensions\pitneybowesmapinfo.mapbasic-0.0.8\tasks.json to  c:\program files\mapbasic\samples\animator\.vscode\tasks.json

     

    Then you can use the build task ( Ctrl+Shift+B ) to build your project and see any errors in the problems window (Ctrl + Shift +P).

    The build tasks calls mapbasic with either the mapbasic files in your folder, or if you have a project file (.mbp) it calls mapbasic with the modules listed in there and also passes the link flag to mapbasic.

    Note that if there is a .mb file with the same name as the module it will try to compile it, but if there is no mb file it uses the .mbo.

    Also note that mapbasic does not remove the previous .mbo when a compile has errors.

     

    So it can build the whole project at once.

     
    Of course you need to have MapBasic installed for the build task to work.
    The build task tries to locate mapbasic via the registry (HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\mapbasic.exe)
    or the MAPBASICEXE environment variable.
    You can also modify the task.json to pass the path to mapbasic.exe as an additional argument.

    Please reply with your thoughts on this.
    Is it a good idea? Would you use it? Would you contribute?
    Even better, give it a try first.

    -Bob



    ------------------------------
    Bob Fortin
    Software Architect and Distinguished Engineer
    MapInfo Pro Development Team
    ------------------------------



  • 2.  RE: MapBasic IDE

    Employee
    Posted 04-04-2019 17:55
      |   view attached
    ​Here is the extension. Extract it before following the instructions above.

    ------------------------------
    Bob Fortin
    Software Architect and Distinguished Engineer
    ------------------------------

    Attachment(s)

    zip
    mapbasic-0.0.8.vsix.zip   27 KB 1 version


  • 3.  RE: MapBasic IDE

    Posted 04-05-2019 02:13
    Hi Bob,

    Thanks for providing this.  I have been using Mustafa's IDE (https://mustafaozcetin.wordpress.com/mapbasic/mapbasicide-en/) for the past few years and it has worked well.  I have now downloaded and installed what you have provided here and am looking forward to trying it when I have the time.

    ------------------------------
    James Nolet
    Dooley Mitchell & Morrison Pty Ltd
    ------------------------------



  • 4.  RE: MapBasic IDE

    Posted 04-08-2019 10:11
      |   view attached
    Hi Bob,

    I've tried that but something is not working.
    VScode is not compiling the mapbasic files.
    If I compile the mb's with mapbasic then I can link in vscode, but if I don't have the mbo's it doesn't compile them and the link fail because they don't exist.

    Do I have to do something else?

    I've sent a printscreen with everything.

    Thanks.

    ------------------------------
    Nuno Seixas
    Buchanan Computing Ltd
    Shelton CT
    ------------------------------



  • 5.  RE: MapBasic IDE

    Posted 04-09-2019 08:40
    @Bob Fortin

    I managed to make it work copying the .mbp file to another folder and create another task to link everything.

    Other problem that I found out is when we have something like this in the code: a = "\"

    Everything after that get the same colour (like it everything is part of a string).

    Thanks.


    ------------------------------
    Nuno Seixas
    Buchanan Computing Ltd
    Shelton CT
    ------------------------------



  • 6.  RE: MapBasic IDE

    Employee
    Posted 04-22-2019 20:10
    Hi Nuno,

    I am seeing the same thing with the "\" 

    Hopefully we can get some more feedback on the interest in this idea, as I think it has great potential.

    -Bob

    ------------------------------
    Bob Fortin
    Software Architect and Distinguished Engineer
    ------------------------------



  • 7.  RE: MapBasic IDE

    Posted 12-23-2019 02:45
    Good morning Bob,

    will there be an updated VS-Code-language file for the new v2019 Version of MapBasic/MiPro?
    Would be great if there is, - the MapBasic IDE hasn't been updated since 4 years now, so some commands might be missing by now.

    Thanks and: Merry Christmas!

    Stefan


  • 8.  RE: MapBasic IDE

    Employee
    Posted 01-28-2020 17:55