Visual Studio Code add-in

1,236 views
Skip to first unread message

Alex Strickland

unread,
Mar 6, 2019, 11:02:57 AM3/6/19
to harbou...@googlegroups.com
Hi all

I just have to congratulate Antonino Perricone on his Visual Studio Code
add-in. I have been using it a while, and really enjoying the coding
experience. Now I started with the debugger and I feel like I am
actually in the 21st century with these tools.

Thank you very much.
--
Regards
Alex

Paola Bruccoleri

unread,
Mar 6, 2019, 2:39:21 PM3/6/19
to harbou...@googlegroups.com
Hi Alex
Can you tell us how you do to debug?
How do you define the tasks to compile the project?
Thank you
regards

----- Mensaje original -----
De: "Alex Strickland" <ss...@mweb.co.za>
Para: harbou...@googlegroups.com
Enviados: Miércoles, 6 de Marzo 2019 13:02:46
Asunto: [harbour-users] Visual Studio Code add-in
--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alex Strickland

unread,
Mar 7, 2019, 3:59:07 AM3/7/19
to harbou...@googlegroups.com
Hi Paola

> Can you tell us how you do to debug?
> How do you define the tasks to compile the project?

I followed these instructions:

https://github.com/APerricone/harbourCodeExtension/wiki/Debugger

Use CTL-SHIFT-P and search for "Harbour:Get Debugger Code", it should
come up as you type.

It will put the debugger source code in the editor, I saved it to a file
called hbvscdebug.prg.

Then I added thw debug file to my hbp, here is a snippet:

easipos.res

ecr.prg

hbvscdebug.prg

ecrapp.prg

ecr.prg is my entry point, and it did not work until I put the the debug
code below (could be unrelated, or needed a full recompile). You need
the -b option (which I keep on always so I have the stack trace info).

I added this to .vscode\launch.json (see the wiki to configure) :

{
// 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": [
{
"type": "harbour-dbg",
"request": "launch",
"name": "EasiPos",
"program": "${workspaceRoot}/easipos",
"arguments": ["/r/WDBG"],
"workingDir": "${workspaceRoot}",
"sourcePaths": [
"${workspaceRoot}"
]
}
]
}

My exe is called easipos.exe - seems the suffix is not needed.

I compiled and hit F5, voila - callstack, variables etc.

HTH.
--
Regards
Alex

Diego Fazio

unread,
Mar 7, 2019, 6:39:51 AM3/7/19
to Harbour Users
The predictive? Works?

Thanks
Diego.

Pete

unread,
Mar 7, 2019, 7:10:55 AM3/7/19
to Harbour Users
Hi,
Sounds interesting! May I ask what C compiler is used to build Harbour application
or to be more precise, is it possible to utilize MinGW with VS Code?

regards,
Pete

Alex Strickland

unread,
Mar 7, 2019, 10:26:08 AM3/7/19
to harbou...@googlegroups.com
Hi Pete

I am using MS Visual C++ but I don't believe the choice of C/C++ compiler would affect anything. Everything is at the Harbour level with the add-in in VS Code. I think most of the add-in is probably javascript.
--
Regards
Alex
--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Eric Lendvai

unread,
Mar 8, 2019, 9:35:22 PM3/8/19
to Harbour Users
Hello Alex,

Would you be interested in writing an article about it on harbour.wiki

Also did you compile Visual Studio Code itself from scratch to avoid the follow:

Thanks

Eric Lendvai

unread,
Mar 28, 2019, 4:16:25 AM3/28/19
to Harbour Users
I succeeded to compile VSCODE from source code.

Now using the Harbour extension .... fantastic !!!

I will be writing an article about it on harbour.wiki.

Step by step instructions to install and use VSCODE and the Harbour extensions.

If anyone could share some tips and tricks about coding in Harbour on VSCODE, I will include them in the article.

Thanks

Diego Fazio

unread,
Mar 28, 2019, 6:22:21 AM3/28/19
to Harbour Users
Excellent Eric!

Thanks
Diego.

Antonino Perricone

unread,
Apr 1, 2019, 6:35:23 AM4/1/19
to Harbour Users
Hello everybody,
I'm glad that my extension likes, your positive comments make me do better and better.
I don't often come into the group, don't esitate to write me an email or report an issue for any problem or request
Regards,
Antonino Perricone

Maurizio la Cecilia

unread,
Apr 2, 2019, 5:13:34 AM4/2/19
to harbou...@googlegroups.com
Hi Antonino,
thanks for your highly valuable product.
I just upgraded to 0.8.9 and trying to get the debugger code I obtain this message:


Not a critical thing, because I can get it from the repository, but could be annoying for someone.
Best regards.
--
Maurizio

Antonino Perricone

unread,
Apr 2, 2019, 9:47:28 AM4/2/19
to Harbour Users
Hello,
I followed some guidelines from VSCode publish procedure... that fails... result: 4 version in 1 hour,,, 
The current one is 0.8.11 and in my Windows 10 PC it works...
Regards,

Maurizio la Cecilia

unread,
Apr 2, 2019, 1:32:19 PM4/2/19
to harbou...@googlegroups.com
Hi Antonino,
the current 0.8.11 version it's working well.
Anyway, as before, the trace stops when the debugger tries to reach hrbinit.prg

Best regards.
--
Maurizio

Carlos Murúa

unread,
Apr 5, 2019, 9:56:09 AM4/5/19
to Harbour Users
Hello Antonio,

Thanks for your highly valuable works.
I have been a visual code user for more than three months and I am very pleased to use this valuable tool.

Lucho Montero

unread,
Apr 11, 2019, 8:12:09 PM4/11/19
to Harbour Users

Hola Gente:
Buenas tardes.
Os comento, que estoy utilizando Visual Studio Code como editor de texto y lo configuré para la Sintaxis de Harbour/xHarbour y la verdad me parece espectacular su entorno gráfico y las funcionalidades que tiene el editor, que además de mostrar la sintaxis permite tener varios .PRG abiertos, hacer búsquedas y reemplazo de cadenas de código, muestra un mapa del contenido del código (muy bueno para cuando los PRG son grandes).
Pero mi duda está en que este post un compañero comenta que desde ¿Visual Studio Code se puede compilar un proyecto y crear los .EXE de nuestras aplicaciones? ¿y además permite hacer debug?.
Si esto fuera así !!! fenomenal ...!!! tendríamos un entorno de Programación con todas las herramientas a la mano es decir: Editor de código, Compilador, Debugger ... pero si no es el caso ... entonces Visual Studio Code lo usuaríamos solo como editor de código.

Saludos.
Atte.
Lucho Montero.
LIMA - PERU.

Roberto Parisi

unread,
Apr 11, 2019, 8:41:43 PM4/11/19
to Harbour Users
Hi Alex, is somewhere a step by step guide to install the plugin and compile/run a simple hello word sample?

Thx 

Regards,
Roberto Parisi

Eric Lendvai

unread,
Apr 11, 2019, 10:58:45 PM4/11/19
to harbou...@googlegroups.com
I am finishing a complete article about vscode for harbour. Will be published next week on harbour.wiki. Step by step instructions with lots of print screens.

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.

Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-users+unsubscribe@googlegroups.com.

hua

unread,
Apr 11, 2019, 11:56:25 PM4/11/19
to Harbour Users
Thanks Eric! Am looking forward to it


On Friday, April 12, 2019 at 10:58:45 AM UTC+8, Eric Lendvai wrote:
I am finishing a complete article about vscode for harbour. Will be published next week on harbour.wiki. Step by step instructions with lots of print screens.

Alex Strickland

unread,
Apr 12, 2019, 2:27:35 AM4/12/19
to harbou...@googlegroups.com
Hi Robert

Antonino's wiki is quite good:


I'm no VS Code expert but it was enough to get me going.
--
Alex
--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.

Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--

Jose F. Gimenez

unread,
Apr 12, 2019, 3:15:19 PM4/12/19
to harbou...@googlegroups.com
Hola Lucho,

lo que comentas de compilar directamente desde el entorno y poder depurar directamente desde el código fuente también lo hace XEdit. Y muchas cosas más. Échale un vistazo. Lo puedes descargar desde http://www2.xailer.com/download/?es&file=3. Y para depurar, puedes descargar la librería desde aquí: http://www2.xailer.com/download/?es&file=128

Si quieres ver un poco cómo se utiliza, puedes echar un vistazo a este video de una reunión de hace algo más de 1 año en Novelda (España): https://www.youtube.com/watch?v=2mqh88-DrYk

Un saludo,

José F. Giménez
http://www.xailer.com
http://www.xailer.info
--

Lucho Montero

unread,
Apr 15, 2019, 1:58:02 AM4/15/19
to harbou...@googlegroups.com
Hola José:
Buenas noches.
Gracias por contestar.
El tema de mi consulta es si desde Visual Studio Code se puede compilar y hacer depuración ... esto es porque lo estoy utilizando solo como editor de Código y para el tema de compilación lo manejo así:
1.- Para entorno texto:
     - xHarbour + QPM + Borland C 7.3 + Visual Studio Code.

2.- Para entorno gráfico.
    - FiveWin + xHarbour + Uestudio + Borland C 7.3 + + Visual Studio Code.
    - y para los recursos utilizo el Visual Studio Comunty.

De todos modos está muy bien que tengamos diferentes alternativas para elegir.

Muchas gracias.
You received this message because you are subscribed to a topic in the Google Groups "Harbour Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/harbour-users/UUVARf6IruM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to harbour-user...@googlegroups.com.

Antonino Perricone

unread,
Apr 15, 2019, 4:19:39 AM4/15/19
to Harbour Users
Hola,
I am working on a debugger for VSCode, to support some feature it is necessary don't use the default debugging code provided with Harbour-xHarbour. 
See https://github.com/APerricone/harbourCodeExtension/wiki/Debugger for a step by step guide for create an executable debuggable with VSCode.
About Build, it is not directly supporte in VSCode, you can create a task to execute a batch/bash script to compile your application, see https://code.visualstudio.com/docs/editor/tasks
Regards,
Antonino

PS. sorry, I don't speak Spanish, 

Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbou...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.

Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to a topic in the Google Groups "Harbour Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/harbour-users/UUVARf6IruM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to harbou...@googlegroups.com.

Jose F. Gimenez

unread,
Apr 16, 2019, 10:29:14 AM4/16/19
to harbou...@googlegroups.com
Hola Lucho,

he entendido tu pregunta, y disculpame por no contestarla directamente. No uso VS y no puedo darte una respuesta.

Pero en mi anterior respuesta, lo que sí te indicaba es que lo que pretendes hacer con VS ya se puede hacer con XEdit. Editar, compilar y depurar, además de otras muchas cosas. Estas son algunas de sus características: gestor de proyectos, motor de compilación multithread, soporte de proyectos HBP, soporte de sintaxis de varios lenguajes (xbase, C, PHP, HTML, etc.), plantillas de código, intellisense (incluso analiza las clases que tengas en todos los PRG de tu proyecto para ofrecerte la lista de miembros), editor de DBF, editor de SQLite, BTS integrado (Bug Tracking System), soporte de plugins, debugger integrado, soporte de CVS y SVN, control de versiones propio integrado XVC, formateador de código, ...

Mi intención es mostrarte una alternativa por si no consigues hacer lo que quieres con VS.


Un saludo,

José F. Giménez
http://www.xailer.com
http://www.xailer.info

Jose F. Gimenez

unread,
Apr 16, 2019, 10:31:16 AM4/16/19
to harbou...@googlegroups.com
Lucho,

se me olvidaba... además es GRATIS  ;-)

Y tienes soporte en castellano.

Diego Fazio

unread,
Apr 16, 2019, 10:38:36 AM4/16/19
to Harbour Users
Yo lo utilizo hace años. Esta muy bueno. 
El predictivo esta genial, incluso funciona con mis propias funciones. Seguramente esto tambien lo tiene VSCode, pero estoy muy comodo con Xedit y no veo cosas que me deslumbren como para cambiarlo. Por ahi para alguien que trabaje a la vez con otro lenguaje se justificaria. 

Diego.

Antonino Perricone

unread,
Apr 16, 2019, 11:28:03 AM4/16/19
to Harbour Users

Y tienes soporte en castellano.

ahahahahaha unfair competition 

Ash

unread,
Apr 16, 2019, 1:26:00 PM4/16/19
to Harbour Users
Hello José ,

How does one install and use xEdit with Harbour without buying xailer?

Regards.
Ash

Jose F. Gimenez

unread,
Apr 16, 2019, 2:57:41 PM4/16/19
to harbou...@googlegroups.com
Antonino,

;-)

Regards,

Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info


El 16/04/2019 a las 17:28, Antonino Perricone escribió:

Y tienes soporte en castellano.

ahahahahaha unfair competition 

Jose F. Gimenez

unread,
Apr 16, 2019, 2:58:26 PM4/16/19
to harbou...@googlegroups.com

Jose F. Gimenez

unread,
Apr 16, 2019, 2:59:59 PM4/16/19
to harbou...@googlegroups.com
Hola Diego,

gracias por tu apoyo. Si quieres probar el debugger integrado, sólo tienes que descargar y enlazar esta librería con tu programa: http://www2.xailer.com/download/?es&file=128


Un saludo,

José F. Giménez
http://www.xailer.com
http://www.xailer.info

--

Ash

unread,
Apr 16, 2019, 6:19:44 PM4/16/19
to Harbour Users
Hello Jose,

How I compile and build with GTWVW?

Regards.
Ash

Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbou...@googlegroups.com.

Lucho Montero

unread,
Apr 17, 2019, 2:03:47 AM4/17/19
to harbou...@googlegroups.com
Hola José:
Buenas noches.
Muchas gracias por la información ... cuando dices que es Gratis ¿te refieres solo al editor xEdit o todo el entorno que describes en tu email? ... 
Lo mismo he podido hacer con QPM que permite compilar con Harbour/xHarbour, y gestionar proyectos, exes, libs. dll, hacer debug y ejecutar desde el mismo entorno y bueno lo acompaño con VSCode + VS Comunity para el tema de los Recursos y todos son Free.
Y bueno como comentaba anteriormente me alegra en que para el mundo xBase se sigan tendiendo diferentes alternativas tanto libres como pagas.

Saludos.
Atte.
Lucho Montero.
Lima - Perú.


Jose F. Gimenez

unread,
Apr 17, 2019, 1:45:21 PM4/17/19
to harbou...@googlegroups.com
Hi Ash,

First, you have to create a new "programming environment". You can do it from menu "Tools" > "Programming environment". Here, click on the + button (left-bottom) and write a name (i.e. "Harbour MinGW"). Then go through every tab and fill any required data (select compiler, paths, ...):





When you select a compier (xbase or c), XEdit fills the flags and library list with default values, but you may change them as needed. At the library list, a plus sign (+) means that this library will be linked by default. A minus sign (-) means that this library will appear in the libraries list in the project but won't be selected by default.

Then you may create a new project ("File" > "New Project"). Fill any required data in the dialog selecting the "Environment" you have created before. In this dialog you may check/uncheck any desired library or add others, like libgtwvw.a. By default, XEdit propose this directory tree:

- Project: The project file at self, and any other file not in the other directories
    - Source: source files (*.prg, *.c, *.cpp, ... )
    - Include: header files (*.ch, *.h, *.api, ... )
    - Resource: resource files (*.rc, *.bmp, *.ico, *.cur, *.jpg, *.png, ... )
    - Obj: this will hold any intermediate object file (*.obj, *.o, *.res, ... )



And now, you may add files or create new ones. Press Ctrl+F9 to compile or press F9 to compile and run...

Alternatively, you may open an .hbp file on XEdit, and it will recognize (almost times) all source files and show them in the "project manager" area. Also, you may press F9 or Ctrl+F9, but then XEdit runs hbmk2.exe to compile the project, instead of using its own compiling engine.

Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.

Jose F. Gimenez

unread,
Apr 17, 2019, 1:50:44 PM4/17/19
to harbou...@googlegroups.com
Lucho,

todo lo que he comentado es gratis, gratis.

Aparte de XEdit nosotros tenemos el producto Xailer, que sí es de pago. El IDE de Xailer contiene todo el código de XEdit, y tiene también otras cosas específicas de Xailer, como el editor visual de formularios. Ten en cuenta que Xailer es un IDE + GUI muy completos, y todo está diseñado para facilitar todo el trabajo posible al programador y hacer que la productividad sea muy alta.

XEdit está hecho con Xailer y es una parte del IDE de Xailer, quitando el editor de formularios y algunas cosas más. Y es 100% gratuito.


Un saludo,

José F. Giménez
http://www.xailer.com
http://www.xailer.info

You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.

Alex Zarucki

unread,
Apr 17, 2019, 2:58:15 PM4/17/19
to Harbour Users
Sorry for my English, I use xEdit, but Russian characters are displayed incorrectly in the Russian layout. In version xEdit 5.04, everything was correct.

2019-04-17_215409.png



среда, 17 апреля 2019 г., 20:50:44 UTC+3 пользователь Jose F. Gimenez написал:

Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to a topic in the Google Groups "Harbour Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/harbour-users/UUVARf6IruM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to harbou...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.

Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbou...@googlegroups.com.

Jose F. Gimenez

unread,
Apr 21, 2019, 3:15:46 PM4/21/19
to harbou...@googlegroups.com
Hi, Alex,

sorry for the delay.

I use latin characters, and I don't know how to type cyrilic chars. However, I've copy and paste some text from your message:



The first line has been pasted while the editor was "ansi" charset selected, while the second line has been pasted once I've selected "russian" charset. I belive that the second line is correct, or at least I see it just like in thunderbird.

I'm not sure what could be happening  :-(

Regards,

Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info

Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.

Alex Zarucki

unread,
Apr 21, 2019, 4:35:51 PM4/21/19
to Harbour Users
Paste from the clipboard all OK. But if you type the text in the Russian encoding - incomprehensible characters. The figures are options in the version xEdit 5.04 and 6.1

воскресенье, 21 апреля 2019 г., 22:15:46 UTC+3 пользователь Jose F. Gimenez написал:
2019-04-21_231854.png
2019-04-21_232436.png

Diego Fazio

unread,
Apr 24, 2019, 2:13:28 PM4/24/19
to Harbour Users
Jose, Utilizo actualmente Xedit con el mingw que trae la version Nightly de harbour. Pero actualmente estoy desarrollando con MSYS32. Quise configurarlo pero el ejecutable que me genera se cuelga apenas lo arranco y observe que ocupa un tamaño que no se condice al que deberia ser. Muy inferior. Como sino me estuviera incluyendo alguna libreria. Al compilar desde el Xedit no obtengo errores. Estoy probando un ejemplo muy basico con gtwvw.

Diego.
Reply all
Reply to author
Forward
0 new messages