anyone using VsCode with Purebasic?

Working on new editor enhancements?
rootuid
User
User
Posts: 48
Joined: Sat Nov 23, 2013 11:46 am

anyone using VsCode with Purebasic?

Post by rootuid »

I'm aware of these two plugins:
PureBasic Extension last updated 2018
PureBasic language last updated 2018
Both of them don't appear to work in 2025. Are there any other Purebasic plugins?

How do I compile and debug from VsCode? I imagine I tell VsCode to use the purebasic command line compiler somehow, anyone done this ?

Thanks in advance :)
Axolotl
Addict
Addict
Posts: 853
Joined: Wed Dec 31, 2008 3:36 pm

Re: anyone using VsCode with Purebasic?

Post by Axolotl »

I guess you found the (one and only) implementation.

Eddy introduced his work here: PB language support for Visual Studio Code

And don't forget eddy on github
Here you can see, that the project is (super) old.

Sorry, I cannot answer your question, because I never used the vscode.
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
User avatar
Piero
Addict
Addict
Posts: 961
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

alternative code editor

Post by Piero »

In case, for alternatives, search akelpad (win) or textmate (mac) on this forum…

I use TextMate as an IDE tool for "advanced editing/completion"; I only implemented error check, because I can quickly return to PB and compile/debug there (PB IDE isn't so bad after all)
PS: If you have a Mac, also search "fuzzy completion"…
User avatar
skywalk
Addict
Addict
Posts: 4223
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: anyone using VsCode with Purebasic?

Post by skywalk »

PB IDE really just missing split view and variable finders. Else, really good flow.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
AZJIO
Addict
Addict
Posts: 2192
Joined: Sun May 14, 2017 1:48 am

Re: anyone using VsCode with Purebasic?

Post by AZJIO »

rootuid wrote: Tue Jul 29, 2025 11:05 pm How do I compile and debug from VsCode?
I think many beginners try to start writing code in their usual editor and try to build a connection with the compiler. But after a while, you'll realize that it's better to write in a standard IDE.
1. The IDE understands the compiler directives that are located at the end of the file. You'll need to write an analyzer for these data to link the compiler to a different editor.
2. You'll need to create a list for auto-completing functions and keywords when typing.
3. The debugger interacts with the IDE, showing the values of variables during debugging and highlighting lines with errors.
4. There are many tools written for the IDE, but they may not be compatible with your editor because they use Scintilla.

A javascript example for searching for an icon and the name of an exe file

Code: Select all

function ExeFindSource(pFile, pExt) {
	var pTmp = AkelPad.ReadFile(pFile);
	var Pos1 = pTmp.indexOf('; Executable = ')
	if (Pos1 != -1)
	{
		Pos1 += 15 //  pStart.length
		var Pos2 = pTmp.indexOf('.' + pExt, Pos1)
		if (Pos2 != -1)
		{
			pTmp = pTmp.substring(Pos1, Pos2 + 4)
			pTmp = sFileDir + '\\' + pTmp
			return pTmp
		}
	}
	return sFileWiExt + pExt
}

function IconFindSource(pFile) {
	var pTmp = AkelPad.ReadFile(pFile);
	var Pos1 = pTmp.indexOf('; UseIcon = ')
	if (Pos1 != -1)
	{
		Pos1 += 12 //  pStart.length
		var Pos2 = pTmp.indexOf('.ico', Pos1)
		if (Pos2 != -1)
		{
			pTmp = pTmp.substring(Pos1, Pos2 + 4)
			var fso = new ActiveXObject("Scripting.FileSystemObject");
			pTmp = sFileDir + '\\' + pTmp
			if (fso.FileExists(pTmp))
			{
				pTmp = ' /ICON "' + pTmp + '"'
			} else {
				pTmp = ''
			}
		}
	}
	return pTmp
}
User avatar
Kurzer
Enthusiast
Enthusiast
Posts: 684
Joined: Sun Jun 11, 2006 12:07 am
Location: Near Hamburg

Re: anyone using VsCode with Purebasic?

Post by Kurzer »

Hello everyone,

After a long break, I'm getting back into PureBasic and am currently setting everything up from scratch on my new computer. While searching for modern editors, I came across VSCodium, a version of VSCode without telemetry.

While searching for a suitable syntax highlighting for PureBasic, I found a new extension called “PureBasic Enhanced” by meimingqi222, whose latest version dates from September 13, 2025. You can find it here: https://marketplace.visualstudio.com/it ... -purebasic

Unfortunately, this extension does not appear in the VSCodium extension search. Probably because it uses the Open VSX marketplace instead of the Microsoft marketplace. I would like to try it out, but without the official VS Code version, I have no easy way to get the *.vsix installation file.

So my question is: Has anyone already installed this extension or downloaded the vsix package?
If anyone could kindly share the file, I would be very grateful!

Thanks in advance.
Kurzer
PB 6.12 x64, OS: Win 11 24H2 x64, Desktopscaling: 150%, CPU: I7 12700 H, RAM: 32 GB, GPU: Intel(R) Iris(R) Xe Graphics | NVIDIA GeForce RTX 3070, User age in 2025: 57y
"Happiness is a pet." | "Never run a changing system!"
User avatar
Piero
Addict
Addict
Posts: 961
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: anyone using VsCode with Purebasic?

Post by Piero »

Kurzer wrote: Mon Sep 15, 2025 8:30 pmvsix package?
This was in my ~/Library/Application Support/Code/CachedExtensionVSIXs/ (without .vsix extension)
User avatar
Kurzer
Enthusiast
Enthusiast
Posts: 684
Joined: Sun Jun 11, 2006 12:07 am
Location: Near Hamburg

Re: anyone using VsCode with Purebasic?

Post by Kurzer »

Grazie mille!

Great Piero, I extracted the file meimingqi222.vscode-purebasic-0.0.2 from your 7zip archive and renamed it to meimingqi222.vscode-purebasic-0.0.2.vsix.
Installation was working like a charme! :)

I'm still thinking about how to handle the updates. But tonight it occurred to me that I could possibly install VSCode in a VM for the update/download process. I just need to check whether I can also download the regular VSIX file instead of installing the update automatically.

In any case, thank you very much for your quick help.
PB 6.12 x64, OS: Win 11 24H2 x64, Desktopscaling: 150%, CPU: I7 12700 H, RAM: 32 GB, GPU: Intel(R) Iris(R) Xe Graphics | NVIDIA GeForce RTX 3070, User age in 2025: 57y
"Happiness is a pet." | "Never run a changing system!"
User avatar
Piero
Addict
Addict
Posts: 961
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: anyone using VsCode with Purebasic?

Post by Piero »

Kurzer wrote: Tue Sep 16, 2025 11:50 amhelp
Can't you compile the dev version?
That should solve it, if it produces a .vsix (I hope so)
User avatar
Kurzer
Enthusiast
Enthusiast
Posts: 684
Joined: Sun Jun 11, 2006 12:07 am
Location: Near Hamburg

Re: anyone using VsCode with Purebasic?

Post by Kurzer »

Piero wrote: Tue Sep 16, 2025 11:58 am Can't you compile the dev version?
To be honest, I haven't considered it.

I'm a bit “weird” in that regard and refuse to install additional software and compile something just to test something (unless I already have the compilation environment installed on my computer). In cases like this, I always check first to see if there is another solution that doesn't require me to install something on my computer that I would only need for this one-time process.
PB 6.12 x64, OS: Win 11 24H2 x64, Desktopscaling: 150%, CPU: I7 12700 H, RAM: 32 GB, GPU: Intel(R) Iris(R) Xe Graphics | NVIDIA GeForce RTX 3070, User age in 2025: 57y
"Happiness is a pet." | "Never run a changing system!"
User avatar
Piero
Addict
Addict
Posts: 961
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: anyone using VsCode with Purebasic?

Post by Piero »

Kurzer wrote: Tue Sep 16, 2025 1:52 pmI'm a bit “weird”
You seem a bit upset :D
I suggested it to you because it seemed to me it could be (hopefully, eventually) a far better solution than a VM! :)
User avatar
Kurzer
Enthusiast
Enthusiast
Posts: 684
Joined: Sun Jun 11, 2006 12:07 am
Location: Near Hamburg

Re: anyone using VsCode with Purebasic?

Post by Kurzer »

No, don't worry, I'm not upset at all. GPT-5 already made this suggestion to compile the sources. It's just my personal quirk, or rather my extreme distractibility, that makes me reluctant to deal with these constantly popping up subtopics. :wink:
PB 6.12 x64, OS: Win 11 24H2 x64, Desktopscaling: 150%, CPU: I7 12700 H, RAM: 32 GB, GPU: Intel(R) Iris(R) Xe Graphics | NVIDIA GeForce RTX 3070, User age in 2025: 57y
"Happiness is a pet." | "Never run a changing system!"
User avatar
Piero
Addict
Addict
Posts: 961
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: anyone using VsCode with Purebasic?

Post by Piero »

Kurzer wrote: Tue Sep 16, 2025 2:52 pmdeal with these constantly popping up subtopics. :wink:
Please, don't tell me; I'm old and tired of learning from this Forum ;)
Post Reply