Page 1 of 1

anyone using VsCode with Purebasic?

Posted: Tue Jul 29, 2025 11:05 pm
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 :)

Re: anyone using VsCode with Purebasic?

Posted: Wed Jul 30, 2025 9:48 am
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.

alternative code editor

Posted: Fri Aug 01, 2025 2:01 pm
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"…

Re: anyone using VsCode with Purebasic?

Posted: Fri Aug 01, 2025 3:37 pm
by skywalk
PB IDE really just missing split view and variable finders. Else, really good flow.

Re: anyone using VsCode with Purebasic?

Posted: Fri Aug 01, 2025 6:40 pm
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
}

Re: anyone using VsCode with Purebasic?

Posted: Mon Sep 15, 2025 8:30 pm
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

Re: anyone using VsCode with Purebasic?

Posted: Tue Sep 16, 2025 11:06 am
by Piero
Kurzer wrote: Mon Sep 15, 2025 8:30 pmvsix package?
This was in my ~/Library/Application Support/Code/CachedExtensionVSIXs/ (without .vsix extension)

Re: anyone using VsCode with Purebasic?

Posted: Tue Sep 16, 2025 11:50 am
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.

Re: anyone using VsCode with Purebasic?

Posted: Tue Sep 16, 2025 11:58 am
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)

Re: anyone using VsCode with Purebasic?

Posted: Tue Sep 16, 2025 1:52 pm
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.

Re: anyone using VsCode with Purebasic?

Posted: Tue Sep 16, 2025 2:38 pm
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! :)

Re: anyone using VsCode with Purebasic?

Posted: Tue Sep 16, 2025 2:52 pm
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:

Re: anyone using VsCode with Purebasic?

Posted: Tue Sep 16, 2025 3:06 pm
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 ;)