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: 802
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: 865
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: 4211
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: 2143
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
}
Post Reply