I'm working on the following features:
- code explorer (outline panel on the left)
- code validation
Code: Select all
{
"version": "2.0.0",
"tasks": [
{
"label": "Compile (test)",
"type": "shell",
"command": "${PUREBASIC_HOME}/compilers/pbcompiler -e myTestApp.app -d -o PB_Editor_CreateExecutable=1 Test_PB.pb",
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Compile (build)",
"type": "shell",
"command": "${PUREBASIC_HOME}/compilers/pbcompiler -e myTestApp.app -o PB_Editor_CreateExecutable=1 Test_PB.pb",
"group": "build",
},
{
"label": "Run",
"type": "shell",
"command": "~/Desktop/myTestApp",
"dependsOn": [
"Compile (test)"
],
"group": {
"kind": "test",
"isDefault": true
}
}
]
}
AFAIK, the "group" must be a hash containing a "kind" property (just like you already configured for the "Compile (test)" task).Wolfram wrote:Hi,
I'm using this code to compile on OSX. The Compile works, but the Run not.
What is wrong?
Code: Select all
{
"label": "Run",
"type": "shell",
"command": "open 'myTestApp.app'",
"dependsOn": [
"Compile (test)"
],
"group": {
"kind": "test",
"isDefault": true
},
"problemMatcher": []
}
Code: Select all
{
"version": "2.0.0",
"options": {
"env": {
"mainFile" : "myMainFile.pb",
"appName" : "myAppName",
"PUREBASIC_HOME": "/Applications/PureBasic_562_x64.app/Contents/Resources",
}
},
"tasks": [
{
"label": "Compile (test)",
"type": "shell",
"command": "pbcompiler -e ${appName}.app -d -t -f -ibp -o PB_Editor_CreateExecutable=1 ${mainFile}",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$eslint-compact"
]
},
{
"label": "Compile (build)",
"type": "shell",
"command": "pbcompiler -e ${appName}.app -t -f -o PB_Editor_CreateExecutable=1 ${mainFile}",
"group": "build",
"problemMatcher": []
},
{
"label": "Run",
"type": "shell",
"command": "${appName}.app/Contents/MacOS/${appName}",
"dependsOn": [
"Compile (test)"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
}
]
}
This is an example of the tasks.json file for OSX.BarryG wrote:So how do we compile our PureBasic apps with this? I press F5 and get prompted to select an environment, which Eddy's is already installed (both). Confused.
I still don't get it. The screenshots are of Windows apps. What is the point of this entire thread? Is it for compiling PureBasic code in Visual Studio Code or not? That's how it appears.Wolfram wrote:This is an example of the tasks.json file for OSX.
It seams you are on Windows.
Visual Studio Code is cross platform and Eddy wrote an plugin for it to be able to write PB code with it.BarryG wrote:I still don't get it. The screenshots are of Windows apps. What is the point of this entire thread? Is it for compiling PureBasic code in Visual Studio Code or not? That's how it appears.Wolfram wrote:This is an example of the tasks.json file for OSX.
It seams you are on Windows.
...which may be a problem on my side.c:\Users\jacde\.vscode\extensions\eddy-r.purebasic-extension-0.1.6\server\out\index.js:33
services_1.Client.connection.workspace.getWorkspaceFolders().then(folders => folders.forEach(folder => {
^
TypeError: Cannot read properties of null (reading 'forEach')
at c:\Users\jacde\.vscode\extensions\eddy-r.purebasic-extension-0.1.6\server\out\index.js:33:94
[Info - 11:18:53] Connection to server got closed. Server will restart.
c:\Users\jacde\.vscode\extensions\eddy-r.purebasic-extension-0.1.6\server\out\index.js:33
services_1.Client.connection.workspace.getWorkspaceFolders().then(folders => folders.forEach(folder => {
^
TypeError: Cannot read properties of null (reading 'forEach')
at c:\Users\jacde\.vscode\extensions\eddy-r.purebasic-extension-0.1.6\server\out\index.js:33:94
[Info - 11:18:54] Connection to server got closed. Server will restart.
c:\Users\jacde\.vscode\extensions\eddy-r.purebasic-extension-0.1.6\server\out\index.js:33
services_1.Client.connection.workspace.getWorkspaceFolders().then(folders => folders.forEach(folder => {
^
TypeError: Cannot read properties of null (reading 'forEach')
at c:\Users\jacde\.vscode\extensions\eddy-r.purebasic-extension-0.1.6\server\out\index.js:33:94
[Info - 11:18:54] Connection to server got closed. Server will restart.
c:\Users\jacde\.vscode\extensions\eddy-r.purebasic-extension-0.1.6\server\out\index.js:33
services_1.Client.connection.workspace.getWorkspaceFolders().then(folders => folders.forEach(folder => {
^
TypeError: Cannot read properties of null (reading 'forEach')
at c:\Users\jacde\.vscode\extensions\eddy-r.purebasic-extension-0.1.6\server\out\index.js:33:94
[Info - 11:18:54] Connection to server got closed. Server will restart.
c:\Users\jacde\.vscode\extensions\eddy-r.purebasic-extension-0.1.6\server\out\index.js:33
services_1.Client.connection.workspace.getWorkspaceFolders().then(folders => folders.forEach(folder => {
^
TypeError: Cannot read properties of null (reading 'forEach')
at c:\Users\jacde\.vscode\extensions\eddy-r.purebasic-extension-0.1.6\server\out\index.js:33:94
[Error - 11:18:54] Connection to server got closed. Server will not be restarted.
You're not really missing much to be honest, the process sounds like fun but it's actually counter productive. eg.