The new release of the editor has this issue:
when I insert a comment to highlight a line—such as //*—the editor interprets it as the start of a comment and stops displaying the list of routines.
However, everything works fine during compilation.
I am attaching a video.
Root cause: the Outline is generated by the GCBASIC extension. It strips /* ... */-style block comments line-by-line before running the symbol regexes, tracking an inBlock flag across the whole file. So, a little change is required.
Run the attached CMD. Restart GCODE or press F2 in GCODE choose 'RELOAD WINDOW'.
If you cannot download the CMD. Cut and paste this into a CMD file.
@echooffsetlocalrem============================================================================rempatch_gccode_outline_fix.cmdremremFixesabugintheGCcode(MierEngineering.GreatCowBasic)VSCodeextension'srem Outline/Symbol provider: a comment line like "//* ----- Configuration" isrem misread as opening a real /* block comment (the second '/' of "//" doublesrem as the first '/' of "/*"), which never closes, so every symbol below thatrem line silently disappears from the Outline for the rest of the file.remrem Usage:rem patch_gccode_outline_fix.cmd [path_to_extension.js]remrem With no argument, patches the default install location:rem C:\GCstudio\vscode\data\extensions\MierEngineering.GreatCowBasic\dist\extension.jsremrem Safe to run more than once - if the fix is already present, it reports thatrem and makes no changes. A timestamped backup of the original file is maderem before any change.rem ============================================================================set "TARGET=%~1"if "%TARGET%"=="" set "TARGET=C:\GCstudio\vscode\data\extensions\MierEngineering.GreatCowBasic\dist\extension.js"if not exist "%TARGET%" ( echo [FAIL] File not found: %TARGET% exit /b 1)echo Target: %TARGET%powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command ^ "$ErrorActionPreference = 'Stop';" ^ "$target = '%TARGET%';" ^ "$old = 'GCBDocumentSymbolProvider.stringRemBlock.test(text.slice(pos,start))';" ^ "$new = 'GCBDocumentSymbolProvider.stringRemBlock.test(text.slice(pos,start+1))';" ^ "$enc = New-Object System.Text.UTF8Encoding($false);" ^ "$text = [System.IO.File]::ReadAllText($target, $enc);" ^ "if ($text.Contains($new)) {" ^ " Write-Host '[OK]Alreadypatched-nochangesmade.';" ^ " exit 0;" ^ "}" ^ "if (-not $text.Contains($old)) {" ^ " Write-Host '[FAIL]Expectedoriginaltextnotfound-filemaybeadifferentversion.Nochangesmade.';" ^ " exit 2;" ^ "}" ^ "$count = ([regex]::Matches($text, [regex]::Escape($old))).Count;" ^ "if ($count -ne 1) {" ^ " Write-Host \"[FAIL] Expected exactly 1 match, found $count - refusing to guess. No changes made.\";" ^ " exit 3;" ^ "}" ^ "$stamp = Get-Date -Format 'yyyyMMdd_HHmmss';" ^ "$backup = \"$target.bak_$stamp\";" ^ "Copy-Item -LiteralPath $target -Destination $backup -Force;" ^ "Write-Host \"[OK] Backed up original to: $backup\";" ^ "$patched = $text.Replace($old, $new);" ^ "[System.IO.File]::WriteAllText($target, $patched, $enc);" ^ "Write-Host '[OK]Patchedsuccessfully.';" ^ "Write-Host 'ReloadGCcode(Ctrl+Shift+P->Developer:ReloadWindow)forthefixtotakeeffect.';" ^ "exit0;"set "RC=%ERRORLEVEL%"if not "%RC%"=="0"(echo[FAIL]Patchscriptexitedwithcode%RC%.)exit/b%RC%
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The new release of the editor has this issue:
when I insert a comment to highlight a line—such as
//*—the editor interprets it as the start of a comment and stops displaying the list of routines.However, everything works fine during compilation.
I am attaching a video.
Interesting.
Found it, and it can be fixed.
Root cause: the Outline is generated by the GCBASIC extension. It strips
/* ... */-style block comments line-by-line before running the symbol regexes, tracking an inBlock flag across the whole file. So, a little change is required.Run the attached CMD. Restart GCODE or press F2 in GCODE choose 'RELOAD WINDOW'.
If you cannot download the CMD. Cut and paste this into a CMD file.
It works perfectly now. Thanks.
Last edit: Giacomo Casano 2026-10-10