Does anyone have vscode build setup for xHarbour commercial builder xbuild.exe,
more precicely to pass xbuild error output to vscode ?
Output on terminal:
* Executing task: d:\xhb201801\bin\xbuild.exe d:\fivewin\xharbour\wpv\exe2022\wpohivah.exe.xbp -CON
D:\fivewin\xharbour\wpv\exe2022\wpohivah.exe->WPOHIVAH.obj
Type: C >>>xhb.exe -o"obj\WPOHIVAH.c" -m -w -n -pOobj\ -DPOHIVAHE -DFIVEWIN -es2 -I"D:\Fivewin\xharbour\INCLUDE" -I"D:\FIVDB226\INCLUDE" -I"C:\fwh202212\include" -I"d:\xhb201801\include" -I"d:\xhb201801\include\w32" "D:\Fivewin\xharbour\wpv\WPOHIVAH.PRG"<<<
xHarbour 1.2.3 Intl. (SimpLex) (Build 20170902)
Copyright 1999-2017, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'D:\Fivewin\xharbour\wpv\WPOHIVAH.PRG' and generating preprocessed output to 'obj\WPOHIVAH.ppo'...
D:\Fivewin\xharbour\wpv\WPOHIVAH.PRG(162) Error E0017 Unclosed control structure at line 159
1 error
No code generated
* The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command d:\xhb201801\bin\xbuild.exe d:\fivewin\xharbour\wpv\exe2022\wpohivah.exe.xbp -CON" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
Nothing appeares on "Problems" panel in vscode.
"problemMatches" section suggested by chatgpt :-)
{
"version": "2.0.0",
"tasks": [
{
"label": "Build with xBuild",
"type": "shell",
"command": "d:\\xhb201801\\bin\\xbuild.exe",
"args": [
"d:\\fivewin\\xharbour\\wpv\\exe2022\\wpohivah.exe.xbp",
"-CON"
],
"options": {
"cwd": "${workspaceFolder}"
},
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": {
"owner": "xharbour",
"fileLocation": ["absolute"],
"pattern": {
"regexp": "^(.*\\.prg)\\((\\d+)\\)\\s+Error\\s+([A-Z0-9]+)\\s*[:\\-]?\\s+(.*)$",
"file": 1,
"line": 2,
"code": 3,
"message": 4
}
}
}
]
}
Thanks,
Taavi
more precicely to pass xbuild error output to vscode ?
Output on terminal:
* Executing task: d:\xhb201801\bin\xbuild.exe d:\fivewin\xharbour\wpv\exe2022\wpohivah.exe.xbp -CON
D:\fivewin\xharbour\wpv\exe2022\wpohivah.exe->WPOHIVAH.obj
Type: C >>>xhb.exe -o"obj\WPOHIVAH.c" -m -w -n -pOobj\ -DPOHIVAHE -DFIVEWIN -es2 -I"D:\Fivewin\xharbour\INCLUDE" -I"D:\FIVDB226\INCLUDE" -I"C:\fwh202212\include" -I"d:\xhb201801\include" -I"d:\xhb201801\include\w32" "D:\Fivewin\xharbour\wpv\WPOHIVAH.PRG"<<<
xHarbour 1.2.3 Intl. (SimpLex) (Build 20170902)
Copyright 1999-2017, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'D:\Fivewin\xharbour\wpv\WPOHIVAH.PRG' and generating preprocessed output to 'obj\WPOHIVAH.ppo'...
D:\Fivewin\xharbour\wpv\WPOHIVAH.PRG(162) Error E0017 Unclosed control structure at line 159
1 error
No code generated
* The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command d:\xhb201801\bin\xbuild.exe d:\fivewin\xharbour\wpv\exe2022\wpohivah.exe.xbp -CON" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
Nothing appeares on "Problems" panel in vscode.
"problemMatches" section suggested by chatgpt :-)
{
"version": "2.0.0",
"tasks": [
{
"label": "Build with xBuild",
"type": "shell",
"command": "d:\\xhb201801\\bin\\xbuild.exe",
"args": [
"d:\\fivewin\\xharbour\\wpv\\exe2022\\wpohivah.exe.xbp",
"-CON"
],
"options": {
"cwd": "${workspaceFolder}"
},
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": {
"owner": "xharbour",
"fileLocation": ["absolute"],
"pattern": {
"regexp": "^(.*\\.prg)\\((\\d+)\\)\\s+Error\\s+([A-Z0-9]+)\\s*[:\\-]?\\s+(.*)$",
"file": 1,
"line": 2,
"code": 3,
"message": 4
}
}
}
]
}
Thanks,
Taavi