VSCode extension for BASIC(modified VBS)

General discussion for topics related to the FreeBASIC project or its community.
kankouhin7937
Posts: 31
Joined: Aug 16, 2018 2:00

VSCode extension for BASIC(modified VBS)

Post by kankouhin7937 »

I have wrote a manual about How to use VSCode to write codes and debug
https://github.com/kankouhin/Kaya-BASIC ... BASIC.xlsx

Features:
syntax coloring
code completion

https://github.com/kankouhin/Kaya-BASIC ... -1.2.0.zip
Last edited by kankouhin7937 on Jan 24, 2021 6:15, edited 4 times in total.
UEZ
Posts: 972
Joined: May 05, 2017 19:59
Location: Germany

Re: VSCode extension for BASIC(modified VBS)

Post by UEZ »

kankouhin7937 wrote:1. Install VBS extension.(serpen.vbsvscode VBScript Language Support)
What does this mean exactly? -> Got it, you mean the VBS extension VSCode.

Btw, is there any tutorial how to setup VSCode editor to use it for FB? The IDE seems to be awesome.
Last edited by UEZ on Jan 23, 2021 18:15, edited 1 time in total.
Xusinboy Bekchanov
Posts: 783
Joined: Jul 26, 2018 18:28

Re: VSCode extension for BASIC(modified VBS)

Post by Xusinboy Bekchanov »

UEZ wrote: Btw, is there any tutorial how to setup VSCode editor to use it for FB? The IDE seems to be awesome.
It's simple:
1) Install C/C++ extension in VSCode.
2) Install lang-freebasic extension in VSCode.
3) Install cppdbg extension in VSCode.
4) Open the folder containing your files in VSCode.
5) Create launch.json and tasks.json in the folder .vscode inside the folder you are opening as the following examples:
https://freebasic.net/forum/viewtopic.php?f=17&t=29117
https://github.com/XusinboyBekchanov/Vi ... er/.vscode
6) And press F5.
UEZ
Posts: 972
Joined: May 05, 2017 19:59
Location: Germany

Re: VSCode extension for BASIC(modified VBS)

Post by UEZ »

@Xusinboy Bekchanov: thanks but I cannot find the extension in 3) cppdbg

Is that the correct name?
Xusinboy Bekchanov
Posts: 783
Joined: Jul 26, 2018 18:28

Re: VSCode extension for BASIC(modified VBS)

Post by Xusinboy Bekchanov »

UEZ wrote:@Xusinboy Bekchanov: thanks but I cannot find the extension in 3) cppdbg

Is that the correct name?
Does it also work without it?
I didn't find it in the installed extensions.
UEZ
Posts: 972
Joined: May 05, 2017 19:59
Location: Germany

Re: VSCode extension for BASIC(modified VBS)

Post by UEZ »

Xusinboy Bekchanov wrote:
UEZ wrote:@Xusinboy Bekchanov: thanks but I cannot find the extension in 3) cppdbg

Is that the correct name?
Does it also work without it?
I didn't find it in the installed extensions.
No, it doesn't work. I'm getting an error message in the debug console when I press F5:

Code: Select all

Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.
Input Error: There is no script engine for file extension ".bas".
Process [26728] exited with code 1 (&H1)
I installed also serpen.vbsvscode-1.2.0.zip.
Xusinboy Bekchanov
Posts: 783
Joined: Jul 26, 2018 18:28

Re: VSCode extension for BASIC(modified VBS)

Post by Xusinboy Bekchanov »

UEZ wrote:
Xusinboy Bekchanov wrote:
UEZ wrote:@Xusinboy Bekchanov: thanks but I cannot find the extension in 3) cppdbg

Is that the correct name?
Does it also work without it?
I didn't find it in the installed extensions.
No, it doesn't work. I'm getting an error message in the debug console when I press F5:

Code: Select all

Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.
Input Error: There is no script engine for file extension ".bas".
Process [26728] exited with code 1 (&H1)
I installed also serpen.vbsvscode-1.2.0.zip.
I don't have that extension, try disabling it.
UEZ
Posts: 972
Joined: May 05, 2017 19:59
Location: Germany

Re: VSCode extension for BASIC(modified VBS)

Post by UEZ »

These are my extensions I've installed:

Image


Without the VBS extension only a menu pops up where I've to select the environment only.
Xusinboy Bekchanov
Posts: 783
Joined: Jul 26, 2018 18:28

Re: VSCode extension for BASIC(modified VBS)

Post by Xusinboy Bekchanov »

Here are my installed extensions in Windows and Linux:
Image
jmgbsas
Posts: 35
Joined: Dec 26, 2020 16:03

Re: VSCode extension for BASIC(modified VBS)

Post by jmgbsas »

[quote="Xusinboy Bekchanov"]Here are my installed extensions in Windows and Linux:
Thanks is running ok, some local variables has confuse name but is ok
In windows 64 with msys64/mingw64..I had all environment ready before because Idebug other languages too..
Xusinboy Bekchanov
Posts: 783
Joined: Jul 26, 2018 18:28

Re: VSCode extension for BASIC(modified VBS)

Post by Xusinboy Bekchanov »

jmgbsas wrote:
Xusinboy Bekchanov wrote:Here are my installed extensions in Windows and Linux:
Thanks is running ok, some local variables has confuse name but is ok
In windows 64 with msys64/mingw64..I had all environment ready before because Idebug other languages too..
You can use direct paths in tasks.json and launch.json.
jmgbsas
Posts: 35
Joined: Dec 26, 2020 16:03

Re: VSCode extension for BASIC(modified VBS)

Post by jmgbsas »

yes, I do it Thanks
this is my lunch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "KayaBASIC Run",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:/MSYS64/mingw64/bin/gdb.exe",
"setupCommands": [
{
"description": "gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "FreeBASIC Build"
}
]
}

and this is my tasks.json for gui compilation
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "FreeBASIC Build",
"type": "shell",
"command": "c:\\it64\\fbedit\\freebasic\\fbc.exe",
"args": [
"-g", "-s", "gui",
"${fileBasenameNoExtension}.bas"
],
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}

And I change the shell terminal, all my compiler see in my PATH of windows,,,
Terminal › Integrated › Shell: Windows
The path of the shell that the terminal uses on Windows (default: C:\Windows\system32\cmd.exe). Read more about configuring the shell.
This is my session of debug...
https://ibb.co/PjXGjvD
kankouhin7937
Posts: 31
Joined: Aug 16, 2018 2:00

Re: VSCode extension for BASIC(modified VBS)

Post by kankouhin7937 »

Xusinboy Bekchanov wrote:
UEZ wrote: Btw, is there any tutorial how to setup VSCode editor to use it for FB? The IDE seems to be awesome.
It's simple:
1) Install C/C++ extension in VSCode.
2) Install lang-freebasic extension in VSCode.
3) Install cppdbg extension in VSCode.
4) Open the folder containing your files in VSCode.
5) Create launch.json and tasks.json in the folder .vscode inside the folder you are opening as the following examples:
https://freebasic.net/forum/viewtopic.php?f=17&t=29117
https://github.com/XusinboyBekchanov/Vi ... er/.vscode
6) And press F5.
cppdbg is not a extension, it included in C/C++ extension.
kankouhin7937
Posts: 31
Joined: Aug 16, 2018 2:00

Re: VSCode extension for BASIC(modified VBS)

Post by kankouhin7937 »

UEZ wrote:
kankouhin7937 wrote:1. Install VBS extension.(serpen.vbsvscode VBScript Language Support)
What does this mean exactly? -> Got it, you mean the VBS extension VSCode.

Btw, is there any tutorial how to setup VSCode editor to use it for FB? The IDE seems to be awesome.

I have wrote a manual about How to use VSCode to write codes and debug
https://github.com/kankouhin/Kaya-BASIC ... BASIC.xlsx
UEZ
Posts: 972
Joined: May 05, 2017 19:59
Location: Germany

Re: VSCode extension for BASIC(modified VBS)

Post by UEZ »

kankouhin7937 wrote:
UEZ wrote:
kankouhin7937 wrote:1. Install VBS extension.(serpen.vbsvscode VBScript Language Support)
What does this mean exactly? -> Got it, you mean the VBS extension VSCode.

Btw, is there any tutorial how to setup VSCode editor to use it for FB? The IDE seems to be awesome.

I have wrote a manual about How to use VSCode to write codes and debug
https://github.com/kankouhin/Kaya-BASIC ... BASIC.xlsx
Thanks for the manual. I will try it and give feedback if it works for me.
Post Reply