Running the web application

Working under Windows10

It took me a while until I understood why I can't run my designed web application. I have to admit, that I'm not really familiar with VSC and its functionality logic.

Seems to be a case problem in the automatically generated files launch.json and task.json.

In launch.json the first entry is

"preLaunchTask": "Build"

but there is no task with that name in task.json, only a task with name "build". Its a bit clumsy to change the name in launch.json. because when you change the first letter to small, its changed back when storing the file. Anyway - after changing it from "Build" to "build" it possible to run the application.

The browser opens and shows an 404 invalid path error message, but maybe I can figure that out also by myself.

Any helpful hints are appreciated ;-)

The same issue is with launch.json entry "Run without debugging" with

"preLaunchTask": "Build without debugging".

It seems, there is no task with that name. I changed it to

"preLaunchTask": "test".

which creates an application in release mode

Would be possible to connect remotely to your machine? Files inside .vscode shouldn't be modified, and they work properly on Windows, you don't need to change any casing, nor change any name of any task.

Please, let me know your availability next week.


Well the solution was, as often quite simple - it was just one option in the OmniPascal extension. If this option is acivated, it overwrites the tasks.json file - that was the reason the preLaunchTasks in the launch.json file could not be found. It might be helpful to explain inside your installation guide what the OmniPascal exension is used for and how it should be configured correctly.

Thanks for sharing. That setting is not a default OmniPascal setting, that is, you should activate it on purpose, so if you enable it, you should be aware what the option does, which is to create its own tasks.json to build projects using FPC/Delphi compilers and that will lead to replace the one that TMS Web Core creates. We take note about it and will see how to minimize this scenario. Thanks!

Thank you for your support Jose, I'm not sure why this option was activated. I can't remember that I set this by purpose. Maybe it was because I played around with the OmniPascal extension a while ago, but never really used it.

Just to confirm my understanding : The OmniPascal extension is only used for syntax and highlighting support when I do pascal programming inside TMS Web Core. Basically I don't need Delphi or Lazarus installed at all? Well, maybe either of those for the VCL/LCL syntax check?

Best regards - Ulrich

OmniPascal is a separate extension by itself, that is, you can use it without having nothing to do with TMS Web Core. What we are doing is to integrate with it for things like syntax highlighting, code completion and also, as it features to select an active project, in order to don't confuse users, we are using it also to specify what project (.dpr/.dproj) is the one you are working on.

And no, you don't need Delphi/FPC/Lazarus installed on your machine in order to work with TMS Web Core for Visual Studio Code, in a clean machine, you just need to install Visual Studio Code, and TMS Web Core extension from the marketplace, that's all.

Got it, OmniPascal is an indenpendent product. What about the code editor functionality? Is that VSC in cooperation with OmniPascal?

Visual Studio Code is a code editor, OmniPascal provides the Object Pascal functionality for Syntax Highlighting, Code Insight, Code Completion, etc.

Thank you Ulrich! Without your comments on the OmniPascal build script setting, I would probably have given up on using TMS Web Core in VSCode.

I previously dabbled with VSCode and OmniPascal to see if it is a viable replacement for Lazarus, and that is probably when I enabled the build script settings.

José, while you are quite correct that this is a setting in a extension that is seperate from TMS Web Core, I agree with UIrich that it would be helpful if the installation instructions warned about this possible conflict.

I take note! Thanks!

1 Like