Debugging Pascal in VS Code

This article is about setting up things so that you can code, compile and debug Free Pascal from Visual Studio Code.

This can be useful if you’re doing non-GUI work and you don’t want to rely on the full-blown Lazarus IDE. It also allows Windows users to write and test Linux programs using the WSL, which is what I did to test this setup. Note that similar steps can be used to configure VS Code for Pascal on a Mac if that’s your poison. …

Photo by Kaboompics .com from Pexels

Travis CI is a website that allows you to implement many such features for free and links to repositories on GitHub. As an experiment, I used it to build and deploy my JavaScript application to an S3 bucket on AWS. S3 (which stands for “Simple Storage Service”) is Amazon’s service for static cloud storage, and in this case, allows other people access to my app over the internet.

This article describes the basic steps I followed to set up automated builds and deployments for my project with Travis CI and S3.

Create a GitHub account

Travis CI links to GitHub, so if you do…

Photo by jiawei cui from Pexels

In an earlier article, I explored running my Azure Pipelines builds on a custom build agent using a Windows VM in the AWS cloud. Today, I will attempt a similar thing, but this time using a Linux VM in the Oracle Cloud. Since much of the process is the same, this article will focus on the challenges that are different.

Creating a virtual machine

On the Oracle website, I chose to create a VM instance by clicking the shortcut from the Quick Actions on the Get Started page:

Photo by Magda Ehlers from Pexels

This article describes steps for setting up Lazarus with mORMot so that you can start using this wonderful, diverse framework in your Free Pascal projects.

You can find the Delphi version here.

Getting Lazarus

Find and download the binaries for your preferred installation of Lazarus here on the Free Pascal wiki. If you’re running Windows, you’ll probably find what you need on the SourceForge page.

Photo by Jeff Stapleton from Pexels

This article describes steps for setting up Delphi with mORMot and, as with most of my articles, exists largely as a reminder for my future self.

You can find the Lazarus/Free Pascal version here.

Getting Delphi

The first step is to install Delphi. In my case, this means going to the Free Delphi Community download page on the Embarcadero website. Sign in, download and run the installer, and enter your serial number when prompted by the wizard.

Getting mORMot

Next, acquire the mORMot library. At the time of writing, Synopse claims on their download page that the “unstable” 1.18 trunk version is more stable…

Photo by jiawei cui from Pexels

Azure Pipelines is Microsoft’s solution for running automatic builds and tests in Azure DevOps. By default, jobs are run using a Microsoft-hosted agent, which spins up a new virtual machine (VM) or container each time a pipeline is executed. However, there is also the option to run jobs in a “self-hosted agent”, which you might consider in these situations:

  • You need to install custom software on the VM.
  • You want to speed up your pipeline by relying on machine-level caching.

In this article, I describe my experience setting up a self-hosted agent on a virtual machine in the cloud. …

Photo by Harrison Haines from Pexels

Going for the monorepo?

Suppose you have two separate git repositories and for some reason, you want to merge them into one. Maybe the source code was originally thought to be independent but was later discovered to be “rightly coupled”. Whatever your reasons, there is probably a commit history in each repository that you want to preserve.

Fortunately, you can do this quite easily by adding one repo to another as a remote. Read on for a step-by-step guide.

Step 1: Prepare your repositories

Before you migrate your repositories into one, it’s worth going through their directory structures and reorganizing things as needed to avoid clashes. …

Selenium Web Driver is a popular tool used to automate the front-end testing of web applications. It uses drivers provided by various browsers (Chrome, Firefox, etc.) to simulate user actions, and is very powerful when combined with testing frameworks such as xUnit or NUnit.

In our case, we decided to use Selenium with .NET Core 3.1 and xUnit. Let me share with you what I’ve learned so far.

Downloading the web driver of your choice

To get started, you will need to download the web driver for the browser you want to test. Note that each web driver is tied to a specific version of the browser…

JavaScript is everywhere, including in your .NET web application.

We already had unit tests in place for the bulk of our ASP.NET MVC project, but we wanted to extend our coverage to include front-end JavaScript code. Preferably, we’d write these tests without leaving Visual Studio, and run them alongside our .NET tests in the same project.

Of course, JavaScript has no shortage of unit testing libraries. However, many of these seem to assume a Node.js stack. Our search led us to Jasmine, a testing framework with zero dependencies on other JS frameworks. …

This post deals with a problem I ran into while testing my .NET Core web APIs using the popular tool Postman, and what I did to get around it. Warning: What I describe here is a workaround for one’s local dev environment only.

The problem

I was testing my API with HTTPS on my localhost, where I have a self-signed certificate such that it produces the following page when I browse to it in Chrome:

Stephan Bester

Software developer walking the edge between legacy systems and modern technology. I also make music:

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store