Solution to the VS Code CWD problem

I left a comment, with the solution concerning opening a terminal in the Current Working Directory [CWD]. I talked about here. I’m repeating the solution here.

I solved my own problem. I was sure it worked for me before, and this idea popped into my head. However I never saw this response/solution (which certainly could be a reason other people had this problem) as a possibility, to the many other people who asked the same question. It works if you open the containing folder…It doesn’t work if you directly open the file!!!!

Afterwards running the JavaScript program works for me, because I’m in the correct directory, using node in the terminal…node javascriptFile.js

So now to continue my JavaScript learning.

VS Code frustrations

Opening a terminal in VS Code doesn’t open it in the directory I’m working in. I want to be competent in Javascript, not VS Code. So I google and get stuff like this…

{
  "key": "cmd+shift+h",
  "command": "workbench.action.terminal.newWithCwd",
  "args": {
    "cwd": "${fileDirname}"
  }
}

Yeah…and? What am I supposed to do with this? I looked at it and it still didn’t work, so obviously I can’t control it by my mind! Am I supposed to add it to the JSON file in settings? I wonder with the little bit of VS Code knowledge I have. I guess not because it didn’t work. Then I saw this…

CWD – current working directory. What am I supposed to do with that empty box? I read “open .” made a little sense…but it didn’t work. Didn’t work without the open either.

OpenSuse File create

Today I copied on OpenSuse a directory from another drive to the OpenSuse home dtive. And I noticed the Created date was today, I don’t remember seeing that before. I wanted it to retain the original dates. I looked up the CLI cp command and it says the -Pr flag will retain the old date. So tried that…no change. Went back to Linux Mint did directory on the OpenSuse drive and it showed the old dates. Turns out OpenSuse does have a Modified field you can add to the file manager, which reflects the old date. And it looks like this.

But how does that make sense? It’s telling me that the files weres modified before they were created!

Underrated distro

I was listening to Destination Linux #237, yesterday. Episode aired 8/2/2021. Topic “What’s the most underrated distro in Linux? Surprisingly almost every host said OpenSuse. Good to hear since I recently started using it again. One thing they said that really pleased me was how you could update it after not for months, and it would still work!

An even simpler Free Pascal SQLite example

I found an even easier SQLite program example. It was in the documentation for TSQLite3Connection. Docs can be found here.
I added a check to the program, to see if the DB exists.

The docs say TSQLite3connection is a FCL (not LCL) non visual component meaning that it can be used in ObjectPascal, console applications as well as Lazarus GUI ones.


FCL – Free Component Library The Free Component Library is meant to be an free equivalent of Delphi’s VCL – only all components in this library are non-visual.
LCL-Lazarus component library

Linux Mint 20.1 problems

I’ve seen more problems with this version than I can remember from Linux Mint. If I remember correctly I tried to install gnuCobol but there was a problem with gcc. And now today, after installing sqlite3. I tried to install the libsqlite3-dev. which I need to access sqlite3 DBs in Free Pascal, and I get…

The following packages have unmet dependencies:
libsqlite3-dev : Depends: libc6-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

WTH? I rarely remember having problem’s trying to install packages in Linux Mint. Especially something as essential as gcc, when it comes to installing other packages. I’m not going to chase down a fix for something so essential!

I can only assume others have found these issues and complained. So I will wait for a newer version to hopefully fix these problems.