You are not logged in.
Pages: 1
Someone using or tried to use Visual Studio Code with FPC + mORMot?
I've been using it for a week and so far it has been a good experience.
I don't like the Lazarus editor, so I use Delphi for coding.
But Visual Studio Code has a great alternative.
In order not to reinvent the wheel, I use the FPCDeluxe to install FPC + Lazarus + Cross Compilers, etc ...
And Lazarus to create the initial project file and generate the options for the compiler (lazy mode on)
My Setup:
- VS Code
- Omnipascal Extension
- Native Debuger Extension
- VsCode Tasks to Build, compile, debug, etc.
And yes, VsCode handle well then SynCommons size
Offline
I only use VsCode for TMS WebCore... but perhaps an alternative to Lazarus for regular FPC code.
What is the debugging experience?
Where could we find some step-by-step tuto to setup a configuration like yours? (if you write something, we could add it to the mORMot doc)
Offline
Yes, I saw that TMS Core is heading towards VsCode. What in my opinion is correct.
I'm using the same debug as lazarus.
That is, it is not the same experience as debugging in Delphi.
But it has been very similar to what you get at Lazarus, at least as far as I have tested.
Yes, I can create a tutorial.
With some examples of Tasks to do the builds, compilation, etc. This part was where I invested the most time, but it wasn't complicated.
Offline
While I myself enjoyed using vs code for other editing tasks, but out of curiosity, can you explain for fpc/mORMot coding why you don't like Lazarus? Does vscode for FPC provide the same code-complete experience as Lazarus?
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
I don't particularly like code completion. It stops working in certain cases. And there are also problems with positioning on the line that has a problem.
There is a bug, which I don't know if it has been fixed, that forces me to put a uses inside the implementation. Without any uses in implementation it generates the error "end of source not found". Not always, is random.
I reported this, but I don't know if it was fixed as I preferred to keep only one version of FCP / lazarus to work well with mORMot:
https://bugs.freepascal.org/view.php?id=35289
In addition, there are all Code extensions that you can add to make editing the code easier.
If Lazarus had support for CnPack and MMX Code Explorer, I might not be looking for other alternatives.
But as far as I know, the IDE does not support plug-ins.
----
In VsCode you need an extension to activate syntax highlighting and code completion for pascal, which in this case is the Omnipascal mentioned above.
With this extension Ctrl + click also works to open the corresponding unit.
Offline
@macfly, Lazarus supports extensions, of course.
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
I didn't really know that. The last time I researched plugins to improve the editor, like CNPack and MMX it did not support. But it must be a long time.
Could you name a few extensions for editor? Is there anything at the level of MMX code explorer?
Offline
I installed Lazarus as shown in the documentation:
https://synopse.info/files/html/Synopse … l#TITL_203
I used the latest fpcupdeluxe 64 bit version and SVN Revision: 59757 for Lazarus, SVN Revision: 40491 for FPC.
So Lazarus and FPC-Versions are:
Lazarus Version#: 2.1.0
FPC Version: 3.3.1
TestSQLite3 ran without errors.
Installation of all FNC Packages ran without errors, too.
However, when trying to install Wecore (tmswebcorepkgdelaz.lpk) I got a compilation error:
frawebcoreprojectoptions.pp(104,26) Error: Identifier idents no member "Parsers"
My question:
Are there SVN-Revisions, to set up a installation of Lazarus/FPC via fpcupdeluxe, that will allow mORMot, FNC and Webcore to be used in parallel?
Arnoud, do you use the Delphi or the FPC compiler in vscode for Webcore?
Offline
IIRC TMS WebCore comes with its own FPC compiler - or more precisely its FPC2JS transpiler.
I tried to use VSCode for WebCore. With no problem.
It doesn't use my main FPC/Lazarus use.
Perhaps they don't support Lazarus trunk.
It is more a question to the TMS support, I guess.
Offline
As ab said, Webcore has its own compiler.
This setup that you are trying to do would be in case you use pas2js (without webcore).
Offline
@ab
Thank you for that answer. But what do I have to do to use the form designer and components of webcore in vscode? Isn't omnipascal a prerequisite for this?
Offline
The TMSWEBCoreDevGuide.pdf and TMSWEBCoreSetupGuide.pdf in don't contain any hint about using vscode for tms webcore. Only a sort section about the Installation for Lazarus.
May I ask, what did you test regarding Webcore and vscode? Did you test the form-designer and had you to install the omnipascal-extension? Or what else did you do in order to use VsCode for TMS WebCore?
In the settings of omnipascal one has to specify the path to the delphi or the fpc compiler and to the IDE, Lazarus or Delphi. Isn't this a requirement for using a form-designer in vscode?
Please excuse these many more general, basic questions.
Offline
I believe that the extension to create forms in visual studio code is still in beta.
A quick google search
https://www.google.com/search?q=tms+web … ore+vccode
And in the first 2 results:
https://tmssoftware.com/site/blog.asp?post=599
https://www.tmssoftware.com/site/blog.asp?post=619
And this:
Our TMS ALL-ACCESS users will be the first to receive a beta for this product. We will send out notifications when this is ready.
But why don't you contact TMS support to address this issue. Only they can answer this.
And you are mixing things up.
Wecore does not use the FPC compiler. It uses the compiler for pas2js. Therefore, in ommipascal you should set the path of the pas2js compiler and not the FPC compiler.
Offline
@macfly
Thank you for your hints.
Webcore for vscode is indeed still pending to be released and OmniPascal will be installed automatically if it's not already installed, so no one has to worry about it. IIUC, omnipascal relies on a prior installation of either Delphi or Lazarus if you want a form-designer inside vscode.
I still wonder how Arnaud can use it, may be he got prerelease version.
Last edited by StefanN (2020-03-31 14:49:17)
Offline
I believe that Arnald does not use a form designer, he must be creating the forms/screens via code.
What in my honest opinion is better than depending on a designer.
From what I read and understood, vscode can be used as stand-alone.
You won't need Delphi / FPC to activate the form designer.
Which makes a lot of sense as it eliminates the need to convert the VCL to HTML / CSS. In VsCode de Designer works with HTML/CSS directly.
All you will need will be the compiler for pas2js, vscode and their extensions.
TMS WEB Core for Visual Studio Code is not a replacement for TMS WEB Core for Delphi. It is nothing more and nothing less than another IDE choice. We believe in freedom of choice. So, every developer can decide for himself what the preferred IDE is, be it Delphi, Lazarus or Visual Studio Code .
Offline
Yes, I can create a tutorial.
With some examples of Tasks to do the builds, compilation, etc. This part was where I invested the most time, but it wasn't complicated.
Maybe I missed something. Is there a link to your tutorial? Thank you!
Offline
Pages: 1