empathicqubit/vscode-cc65-debugger

I just cant get it to work - please help?

nickbungus opened this issue · 38 comments

Hi

I've been trying my best to get this to work for hours. I've followed the instructions as much as possible. I'm just trying to get the 'simple-project' example to work.

When I build I get an error saying 'Could not Load symbols file from cc65. It must have the same name as the d84/d64/prg file with .DBG extension.'

I cant get it to even build a prg.

Is there further configuration required to get the simple-project to build? Am I missing any other plugins etc?

Also, I have no idea what Jest code is either and where to find it. Is there a more simple example? Whatever happened to go old HelloWorld?

Sorry if I sound frustrated but it looks like such a great tool if I can get going?

Thanks Nick

Fail1

Heres the terminal output when I try and run it:

Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\nickb\OneDrive\Documents\C65Test>  ${env:PATH}='c:\Users\nickb\.vscode\extensions\entan-gl.cc65-vice-5.0.0\dist\cc65/bin_win32_x64;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Users\nickb\AppData\Local\Microsoft\WindowsApps;;C:\Users\nickb\AppData\Local\Programs\Microsoft VS Code\bin'; ${env:CC65_HOME}='c:\Users\nickb\.vscode\extensions\entan-gl.cc65-vice-5.0.0\dist\cc65'; ${env:ELECTRON_RUN_AS_NODE}='1'; & 'cmd.exe' '"/S"' '"/C"' '"make"' '"OPTIONS=mapfile,labelfile,debugfile"' '&&' 'echo' '>' '"C:\Users\nickb\AppData\Local\Temp/cc65vice_make_success_0.8047028469216617"' '||' 'echo' '>' '"C:\Users\nickb\AppData\Local\Temp/cc65vice_make_failure_0.9811537068026799"'

C:\Users\nickb\OneDrive\Documents\C65Test>pushd C:\Users\nickb\OneDrive\Documents\C65Test\ 

C:\Users\nickb\OneDrive\Documents\C65Test>set SCRIPT_DIR=C:\Users\nickb\OneDrive\Documents\C65Test

C:\Users\nickb\OneDrive\Documents\C65Test>popd

C:\Users\nickb\OneDrive\Documents\C65Test>for / %I in ("C:\Users\nickb\.vscode\extensions\entan-gl.cc65-vice-*") do @set EXTENSION_PATH=%~I\build.bat

C:\Users\nickb\OneDrive\Documents\C65Test>if exist "C:\Users\nickb\OneDrive\Documents\C65Test\..\..\..\build.bat" ("C:\Users\nickb\OneDrive\Documents\C65Test\..\..\..\build.bat" make.exe "OPTIONS=mapfile,labelfile,debugfile" )  else if exist "C:\Users\nickb\.vscode\extensions\entan-gl.cc65-vice-5.0.0\build.bat" ("C:\Users\nickb\.vscode\extensions\entan-gl.cc65-vice-5.0.0\build.bat" make.exe "OPTIONS=mapfile,labelfile,debugfile" )  else (make.exe "OPTIONS=mapfile,labelfile,debugfile" )

C:\Users\nickb\OneDrive\Documents\C65Test>setlocal enabledelayedexpansion enableextensions

C:\Users\nickb\OneDrive\Documents\C65Test>pushd "C:\Users\nickb\.vscode\extensions\entan-gl.cc65-vice-5.0.0\"

C:\Users\nickb\.vscode\extensions\entan-gl.cc65-vice-5.0.0>set SCRIPT_DIR=C:\Users\nickb\.vscode\extensions\entan-gl.cc65-vice-5.0.0

C:\Users\nickb\.vscode\extensions\entan-gl.cc65-vice-5.0.0>popd

C:\Users\nickb\OneDrive\Documents\C65Test>for %i in (code) do @set CODE=%~$PATH:i

C:\Users\nickb\OneDrive\Documents\C65Test>call :dirname CODE_DIR "!CODE!"

C:\Users\nickb\OneDrive\Documents\C65Test>(
set "CODE_DIR=C:\Users\nickb\AppData\Local\Programs\Microsoft VS Code\bin\"  
 exit /b
)

C:\Users\nickb\OneDrive\Documents\C65Test>set BUILD=C:\Users\nickb\.vscode\extensions\entan-gl.cc65-vice-5.0.0/dist/debug-adapter.js

C:\Users\nickb\OneDrive\Documents\C65Test>set ELECTRON_RUN_AS_NODE=1

C:\Users\nickb\OneDrive\Documents\C65Test>"C:\Users\nickb\AppData\Local\Programs\Microsoft VS Code\bin\\..\code" "C:\Users\nickb\.vscode\extensions\entan-gl.cc65-vice-5.0.0/dist/debug-adapter.js" build make.exe "OPTIONS=mapfile,labelfile,debugfile"        

C:\Users\nickb\OneDrive\Documents\C65Test>goto eof 

C:\Users\nickb\OneDrive\Documents\C65Test>endlocal
PS C:\Users\nickb\OneDrive\Documents\C65Test> 

Can you try making the change to your launch.json linked above my comment? Also, delete every C file except for main.c, and replace main with

#include <stdio.h>
unsigned char main() {
    printf("hello world\n");

    return 0;
}

Sorry this is confusing. I'm using the project to run my tests against. I'll move it to a different place so it's less confusing.

I pushed a change that removes the autodection, which often doesn't work properly. You will be required to add the two properties to your launch.json now.

err
No need to apologise, I'm sure its my fault.

Still getting the error. I've updated the plugin, deleted all .c files except main, updated the main.c as requested and added the following 2 lines to my launch.json:
"debugFile": "${workspaceFolder}/simple-project.c64.dbg",
"mapFile": "${workspaceFolder}/simple-project.c64.map",
Heres my project folder if that helps: VSCodeHello.zip

And heres the terminal output when I try and build:

PS D:\Downloads\VSCodeHello>  ${env:PATH}='c:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2\dist\cc65/bin_win32_x64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files\dotnet\;C:\Program Files (x86)\Plantronics\Spokes3G\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Users\Nick James\Desktop\C64\CC65\cc65-snapshot-win32;C:\Users\Nick James\AppData\Local\Microsoft\WindowsApps;;C:\Users\Nick James\AppData\Local\Programs\Microsoft VS Code\bin'; ${env:CC65_HOME}='C:\Users\Nick James\Desktop\C64\CC65\cc65-snapshot-win32'; ${env:ELECTRON_RUN_AS_NODE}='1'; & 'cmd.exe' '"/S"' '"/C"' '"make"' '"OPTIONS=mapfile,labelfile,debugfile"' '&&' 'echo' '>' '"C:\Users\NICKJA~1\AppData\Local\Temp/cc65vice_make_success_0.7528276319647926"' '||' 'echo' '>' '"C:\Users\NICKJA~1\AppData\Local\Temp/cc65vice_make_failure_0.7234311877139428"' 

D:\Downloads\VSCodeHello>pushd D:\Downloads\VSCodeHello\

D:\Downloads\VSCodeHello>set SCRIPT_DIR=D:\Downloads\VSCodeHello

D:\Downloads\VSCodeHello>popd

D:\Downloads\VSCodeHello>for / %I in ("C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-*") do @set EXTENSION_PATH=%~I\build.bat

D:\Downloads\VSCodeHello>if exist "D:\Downloads\VSCodeHello\..\..\..\build.bat" ("D:\Downloads\VSCodeHello\..\..\..\build.bat" make.exe "OPTIONS=mapfile,labelfile,debugfile" )  else if exist "C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2\build.bat" ("C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2\build.bat" make.exe "OPTIONS=mapfile,labelfile,debugfile" )  else (make.exe "OPTIONS=mapfile,labelfile,debugfile" )

D:\Downloads\VSCodeHello>setlocal enabledelayedexpansion enableextensions

D:\Downloads\VSCodeHello>pushd "C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2\"

C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2>set SCRIPT_DIR=C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2

C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2>popd

D:\Downloads\VSCodeHello>for %i in (code) do @set CODE=%~$PATH:i

D:\Downloads\VSCodeHello>call :dirname CODE_DIR "!CODE!"

D:\Downloads\VSCodeHello>(
set "CODE_DIR=C:\Users\Nick James\AppData\Local\Programs\Microsoft VS Code\bin\"
 exit /b
)

D:\Downloads\VSCodeHello>set BUILD=C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2/dist/debug-adapter.js

D:\Downloads\VSCodeHello>set ELECTRON_RUN_AS_NODE=1

D:\Downloads\VSCodeHello>"C:\Users\Nick James\AppData\Local\Programs\Microsoft VS Code\bin\\..\code" "C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2/dist/debug-adapter.js" build make.exe "OPTIONS=mapfile,labelfile,debugfile"

D:\Downloads\VSCodeHello>goto eof

D:\Downloads\VSCodeHello>endlocal

It works for me after some finagling. A few things:

  • Remove NES from the targets in the Makefile if you don't need it. Using that will break some functions. I updated this in the new project template and mentioned for those that need NES support what to do to re-enable it. You may also want to remove PET.
  • The Makefile saves the program-related files to foldername.whatever, so if your folder name is VSCodeHello, you need to set it to
            "program": "${workspaceFolder}/VSCodeHello.c64",
            "debugFile": "${workspaceFolder}/VSCodeHello.c64.dbg",
            "mapFile": "${workspaceFolder}/VSCodeHello.c64.map",

I may consider changing this behavior to use a constant name if you find that this is what's causing you problems. Done

  • If you're having trouble with the build, try using make.bat on the command line, or by launching with Ctrl+Shift+B. That may reveal more detailed output about what went wrong. Even if these other points help solve your problem, can you still try the batch to see what it does on your machine? I want to be sure it works correctly.
D:\Downloads\VSCodeHello>dir
 Volume in drive D is New Volume
 Volume Serial Number is 1852-5BCD

 Directory of D:\Downloads\VSCodeHello

16/11/2021  16:51    <DIR>          .
16/11/2021  16:51    <DIR>          ..
16/11/2021  16:50               114 .gitignore
16/11/2021  16:50               783 .vimspector.json
16/11/2021  16:50    <DIR>          .vscode
16/11/2021  16:50               343 make.bat
16/11/2021  16:50               319 make.sh
19/11/2021  15:11            12,083 Makefile
16/11/2021  16:50                38 Makefile.options
19/11/2021  09:02    <DIR>          src
               6 File(s)         13,680 bytes
               4 Dir(s)  335,464,198,144 bytes free

D:\Downloads\VSCodeHello>make.bat

D:\Downloads\VSCodeHello>pushd D:\Downloads\VSCodeHello\

D:\Downloads\VSCodeHello>set SCRIPT_DIR=D:\Downloads\VSCodeHello

D:\Downloads\VSCodeHello>popd

D:\Downloads\VSCodeHello>for / %I in ("C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-*") do @set EXTENSION_PATH=%~I\build.bat

D:\Downloads\VSCodeHello>if exist "D:\Downloads\VSCodeHello\..\..\..\build.bat" ("D:\Downloads\VSCodeHello\..\..\..\build.bat" make.exe  )  else if exist "C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2\build.bat" ("C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2\build.bat" make.exe  )  else (make.exe  )

D:\Downloads\VSCodeHello>setlocal enabledelayedexpansion enableextensions

D:\Downloads\VSCodeHello>pushd "C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2\"

C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2>set SCRIPT_DIR=C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2

C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2>popd

D:\Downloads\VSCodeHello>for %i in (code) do @set CODE=%~$PATH:i

D:\Downloads\VSCodeHello>call :dirname CODE_DIR "!CODE!"

D:\Downloads\VSCodeHello>(
set "CODE_DIR=C:\Users\Nick James\AppData\Local\Programs\Microsoft VS Code\bin\"
 exit /b
)

D:\Downloads\VSCodeHello>set BUILD=C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2/dist/debug-adapter.js

D:\Downloads\VSCodeHello>set ELECTRON_RUN_AS_NODE=1

D:\Downloads\VSCodeHello>"C:\Users\Nick James\AppData\Local\Programs\Microsoft VS Code\bin\\..\code" "C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2/dist/debug-adapter.js" build make.exe

D:\Downloads\VSCodeHello>goto eof

D:\Downloads\VSCodeHello>endlocal

D:\Downloads\VSCodeHello>

Hi, made the changes and still no joy. Above is from the command prompt from me running the bat file

I'm not seeing any output from the build itself. Can you try running this command in the project directory from Powershell?

& "$env:USERPROFILE\.vscode\extensions\entan-gl.cc65-vice-*\dist\mintty\bin_win32_x64\mintty.exe" --hold always ".\make.bat"

This is the output I get when I use Ctrl+Shift+B:

Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\src\__tests__\c-project-template>pushd Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\src\__tests__\c-project-template\   

Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\src\__tests__\c-project-template>set SCRIPT_DIR=Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\src\__tests__\c-project-template

Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\src\__tests__\c-project-template>popd

Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\src\__tests__\c-project-template>for / %I in ("Z:\UserProfiles\EmpathicQubit\.vscode\extensions\entan-gl.cc65-vice-*") do @set EXTENSION_PATH=%~I\build.bat

Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\src\__tests__\c-project-template>if exist "Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\src\__tests__\c-project-template\..\..\..\build.bat" ("Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\src\__tests__\c-project-template\..\..\..\build.bat" make.exe  )  else if exist "Z:\UserProfiles\EmpathicQubit\.vscode\extensions\entan-gl.cc65-vice-5.0.2\build.bat" ("Z:\UserProfiles\EmpathicQubit\.vscode\extensions\entan-gl.cc65-vice-5.0.2\build.bat" make.exe  )  else (make.exe  )

Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\src\__tests__\c-project-template>setlocal enabledelayedexpansion enableextensions

Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\src\__tests__\c-project-template>pushd "Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\"

Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger>set SCRIPT_DIR=Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger  

Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger>popd    

Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\src\__tests__\c-project-template>for %i in (code) do @set CODE=%~$PATH:i

Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\src\__tests__\c-project-template>call :dirname CODE_DIR "!CODE!"   

Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\src\__tests__\c-project-template>(
set "CODE_DIR=C:\Program Files\Microsoft VS Code\bin\"     
 exit /b
)

Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\src\__tests__\c-project-template>set BUILD=Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger/dist/debug-adapter.js

Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\src\__tests__\c-project-template>set ELECTRON_RUN_AS_NODE=1        

Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\src\__tests__\c-project-template>"C:\Program Files\Microsoft VS Code\bin\\..\code" "Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger/dist/debug-adapter.js" build make.exe
CC65_HOME Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\dist\cc65
CC65 path Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\dist\cc65/bin_win32_x64
Started build [ 9368, 9368 ]
C:/ProgramData/chocolatey/lib/make/tools/install/bin/make.exe TARGETS=c64 all
make[1]: Entering directory 'Z:/UserProfiles/EmpathicQubit/vscode-cc65-debugger/src/__tests__/c-project-template'     
Using saved OPTIONS=mapfile,labelfile,debugfile
cl65 -t c64 -c --create-dep obj/c64/main.d -Wc "--debug-tables" -Wc "obj/c64/main.tab" -g -o obj/c64/main.o src/main.ccl65 -t c64 -g --mapfile program.c64.map -Ln program.c64.lbl -Wl --dbgfile,program.c64.dbg -o program.c64 obj/c64/main.o
make[1]: Leaving directory 'Z:/UserProfiles/EmpathicQubit/vscode-cc65-debugger/src/__tests__/c-project-template'      
C:/ProgramData/chocolatey/lib/make/tools/install/bin/make.exe TARGETS=pet all
make[1]: Entering directory 'Z:/UserProfiles/EmpathicQubit/vscode-cc65-debugger/src/__tests__/c-project-template'     
Using saved OPTIONS=mapfile,labelfile,debugfile
cl65 -t pet -c --create-dep obj/pet/main.d -Wc "--debug-tables" -Wc "obj/pet/main.tab" -g -o obj/pet/main.o src/main.ccl65 -t pet -g --mapfile program.pet.map -Ln program.pet.lbl -Wl --dbgfile,program.pet.dbg -o program.pet obj/pet/main.o
make[1]: Leaving directory 'Z:/UserProfiles/EmpathicQubit/vscode-cc65-debugger/src/__tests__/c-project-template'      
Finished build [ 9368, 9368 ]

Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\src\__tests__\c-project-template>goto eof

Z:\UserProfiles\EmpathicQubit\vscode-cc65-debugger\src\__tests__\c-project-template>endlocal

Also, can you verify that C:\Users\Nick James\AppData\Local\Programs\Microsoft VS Code\code exists?

Can you help me understand how your system is setup? I've noticed that your user folder is nickb in one case and Nick J in another.

Sorry for so many messages. Can you also send me the contents of VSCode's "Help > About" window. That would look like this:

Version: 1.60.0 (system setup)
Commit: e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff
Datum: 2021-09-01T10:41:52.311Z
Electron: 13.1.8
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
Betriebssystem: Windows_NT x64 10.0.19042

Heres the output from & "$env:USERPROFILE.vscode\extensions\entan-gl.cc65-vice-*\dist\mintty\bin_win32_x64\mintty.exe" --hold always ".\make.bat"

D:\Downloads\VSCodeHello>pushd D:\Downloads\VSCodeHello\

D:\Downloads\VSCodeHello>set SCRIPT_DIR=D:\Downloads\VSCodeHello

D:\Downloads\VSCodeHello>popd

D:\Downloads\VSCodeHello>for / %I in ("C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-*") do @set EXTENSION_PATH=%~I\build.bat

D:\Downloads\VSCodeHello>if exist "D:\Downloads\VSCodeHello\..\..\..\build.bat" ("D:\Downloads\VSCodeHello\..\..\..\build.bat" make.exe  )  else if exist "C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2\build.bat" ("C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2\build.bat" make.exe  )  else (make.exe  )

D:\Downloads\VSCodeHello>setlocal enabledelayedexpansion enableextensions

D:\Downloads\VSCodeHello>pushd "C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2\"

C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2>set SCRIPT_DIR=C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2

C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2>popd

D:\Downloads\VSCodeHello>for %i in (code) do @set CODE=%~$PATH:i

D:\Downloads\VSCodeHello>call :dirname CODE_DIR "!CODE!"

D:\Downloads\VSCodeHello>(
set "CODE_DIR=C:\Users\Nick James\AppData\Local\Programs\Microsoft VS Code\bin\"
 exit /b
)

D:\Downloads\VSCodeHello>set BUILD=C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2/dist/debug-adapter.js

D:\Downloads\VSCodeHello>set ELECTRON_RUN_AS_NODE=1

D:\Downloads\VSCodeHello>"C:\Users\Nick James\AppData\Local\Programs\Microsoft VS Code\bin\\..\code" "C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2/dist/debug-adapter.js" build make.exe

D:\Downloads\VSCodeHello>goto eof

D:\Downloads\VSCodeHello>endlocal

C:\Users\Nick James\AppData\Local\Programs\Microsoft VS Code\code

It resolves and starts a new instance of VSC

Heres the about section:

Version: 1.62.3 (user setup)
Commit: ccbaa2d27e38e5afa3e5c21c1c7bef4657064247
Date: 2021-11-17T08:11:14.551Z
Electron: 13.5.2
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19042

Dont worry at all about the questions, I'm very grateful for your help and effort

Comparing your files against mine, somethings going wrong around the build make.exe process by the looks of it.

Its been a long time since I've done any C (uni days) with all the make files and headers and everything so I'm very rusty

I hear you. I've avoided touching C since uni also. I only just recently got back into it because of this project and VICE.

I'm wondering what's going wrong. The script starts the build process using VSCode. We may need to try bypassing that and try running it directly. Can you try running this from the project folder using Powershell:

${env:CC65_HOME}=(Get-Item "$env:USERPROFILE\.vscode\extensions\entan-gl.cc65-vice-*\dist\cc65").FullName
${env:PATH}=(Get-Item "$env:USERPROFILE\.vscode\extensions\entan-gl.cc65-vice-*\dist\cc65/bin_win32_x64").FullName + ';' + ${env:PATH}
 & "$env:USERPROFILE\.vscode\extensions\entan-gl.cc65-vice-*\dist\mintty\bin_win32_x64\mintty.exe" --hold always "cmd.exe" "/S" "/K" "make.exe" "clean" "&&" "make.exe"

When you paste in the output, can you wrap it like this:

```powershell
The output
```

Without the quotes some characters will get eaten. I can go back and edit your posts though so it's not a big deal.

I'm seeing the problem when I upgrade to your version of VSCode, but could you still follow the steps I listed above? I want to be sure it does work for you and that there aren't any other problems.

Actually, one other thing. Can you change build.command to make.exe in your launch.json and try that? That would look like:

            "build": {
                "cwd": "${workspaceFolder}",
                "command": "make.exe",
                "args": [
                    "OPTIONS=mapfile,labelfile,debugfile"
                ]
            },

Please send me the output from that also (from the Building... terminal). I will rename make.bat to mk.bat so this collision won't happen.

I should clarify, I am still able to build and run projects in the latest version of VSCode, but without the change I listed above the output won't show. Anything that spawns a new instance of VSCode for the build process, rather than calling make directly, won't show the output correctly, but it still seems to work.

image

Ok. So I've changed the command to make.exe and now I get a .c64, a .dbg and a .map file. However it doesnt run at all. I renamed the .c64 file to .prg and it runs in VICE (as above)

${env:CC65_HOME}=(Get-Item "$env:USERPROFILE\.vscode\extensions\entan-gl.cc65-vice-*\dist\cc65").FullName ${env:PATH}=(Get-Item "$env:USERPROFILE\.vscode\extensions\entan-gl.cc65-vice-*\dist\cc65/bin_win32_x64").FullName + ';' + ${env:PATH} & "$env:USERPROFILE\.vscode\extensions\entan-gl.cc65-vice-*\dist\mintty\bin_win32_x64\mintty.exe" --hold always "cmd.exe" "/S" "/K" "make.exe" "clean" "&&" "make.exe"
results:
This opens 2 new Windows:
The Mitty.exe if just blank.
The cmd.exe has the following
Using saved OPTIONS=mapfile,labelfile,debugfile del /f obj\c64\main.o del /f obj\c64\main.d del /f obj\c64\main.tab del /f VSCodeHello.c64.map VSCodeHello.c64.lbl VSCodeHello.c64.dbg del /f VSCodeHello.c64 Using saved OPTIONS=mapfile,labelfile,debugfile cl65 -t c64 -c --create-dep obj/c64/main.d -Wc "--debug-tables" -Wc "obj/c64/main.tab" -g -o obj/c64/main.o src/main.c cl65 -t c64 -g --mapfile VSCodeHello.c64.map -Ln VSCodeHello.c64.lbl -Wl --dbgfile,VSCodeHello.c64.dbg -o VSCodeHello.c64 obj/c64/main.o

So running from VSC code:

The building... tab:

 PS D:\Downloads\VSCodeHello>  ${env:PATH}='c:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2\dist\cc65/bin_win32_x64;C:\WINDOC:\WINWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\ProicrosoDOWS\System3gram Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Micr\Binn\icrosoft SQLosoft SQL Server\150\DTS\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\Progiles (ools\Binn\;Cram Files\dotnet\;C:\Program Files (x86)\Plantronics\Spokes3G\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\ProgramBinn\;00\Tools\Bin Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\ProgramData\chocolatey\bin;C:\Users\Nick James\Desktop\C64\CC65\cc65-snapshot-win32;t\Windbin;C:\UsersC:\Users\Nick James\AppData\Local\Microsoft\WindowsApps;;C:\Users\Nick James\AppData\Local\Programs\Microsoft VS Code\bin'; ${env:CC65_HOME}='C:\Users\Nick James\Desktop\C64\CC65\cc65-sna 'cmd.\Users\Nick pshot-win32'; ${env:ELECTRON_RUN_AS_NODE}='1'; & 'cmd.exe' '"/S"' '"/C"' '"make.exe"' '"OPTIONS=mapfile,labelfile,debugfile"' '&&' 'echo' '>' '"C:\Users\NICKJA~1\AppData\Local\Temp/cc65vi'"C:\UAppData\Locace_make_success_0.14313315606662025"' '||' 'echo' '>' '"C:\Users\NICKJA~1\AppData\Local\Temp/cc65vice_make_failure_0.8364610879972985"

The Vice Tab:

PS C:\Users\Nick James\AppData\Local\Programs\Microsoft VS Code>  ${env:ELECTRON_RUN_AS_NODE}='1'; & 'cmd.exe' '"/S"' '"/C"' '"x64sc"' '"-default"' '"+sound"' '"+remotemonitor"' '"-binarymonitor"' '"-binarymonitoraddress"' '"127.0.0.1:29741"'
PS C:\Users\Nick James\AppData\Local\Programs\Microsoft VS Code>  D:; cd 'D:\Downloads\VSCodeHello'; ${env:ELECTRON_RUN_AS_NODE}='1'; & 'cmd.exe' '"/S"' '"/C"' '"x64sc"' '"-directory"' '""c:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2\dist\system\C64;c:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2\dist\system\DRIVES;c:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2\dist\system\PRINTER""' '"-sound"' '"-iecdevice8"' '"-autostart-warp"' '"-autostartprgmode"' '"1"' '"+autostart-handle-tde"' '"-logfile"' '"C:\Users\NICKJA~1\AppData\Local\Temp\cc65-vice-227081BE4NiNDcvbx"' '"-moncommands"' '"D:\Downloads\VSCodeHello/VSCodeHello.c64.lbl"' '"-remotemonitor"' '"-remotemonitoraddress"' '"127.0.0.1:29319"' '"-binarymonitor"' '"-binarymonitoraddress"' '"127.0.0.1:29743"'

And Log Output Tab:

PS C:\Users\Nick James\.vscode\extensions\entan-gl.cc65-vice-5.0.2\dist>  ${env:ELECTRON_RUN_AS_NODE}='1'; & 'cmd.exe' '"/S"' '"/C"' '"powershell"' '"-Command"' '"Get-Content"' '"C:\Users\NICKJA~1\AppData\Local\Temp\cc65-vice-227081BE4NiNDcvbx"' '"-Wait"'
Get-Content : Cannot find path 'C:\Users\NICKJA~1\AppData\Local\Temp\cc65-vice-227081BE4NiNDcvbx' because it does not exist.
At line:1 char:1
+ Get-Content C:\Users\NICKJA~1\AppData\Local\Temp\cc65-vice-227081BE4N ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\NICKJA...7081BE4NiNDcvbx:String) [Get-Content], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand 

And then I get this after about 30 seconds:
image

So to sum up, its now building correctly, it just isnt starting the debugger

Can you please use this to record exactly what you're doing? Also switch between all the opened terminals so I can see their contents. Make sure you're using the latest c-project-template, and not simple-project. I made the changes we discussed earlier.

https://www.screentogif.com/

Edit: I didn't see your most recent messages.

Do you have a firewall running? If so I would try turning that off.

Is the popup window ECONNREFUSED part of the same run as the VICE log you pasted? The reason I'm asking this is because the popup and the first log line says 29741, but the last log line says 29743.

What version of VICE are you using?

Does VICE start at all and just not autostart the program?

Also, what happens if you try setting the port explicitly in your launch.json? Just set port to any port you're sure is free and hasn't been used before.

Hi disabling the firewall, still the same.

image

Vice does not start at all.

If you email me I can get you Teamviewed onto my PC. Might save you some time. My email is [redacted]

Okay, I think that would be best. I was going to ask you but it seemed maybe weird. I'll send you an email. mine is empathicqubit (at) entan (dot) gl

I sent you an email

I'm in Germany, which is UTC+1, or 16:30 right now.

Thanks for helping out with that!

Fixed with #84 . Thanks again for all your help!