CaptainJiNX / vscode-kickass-c64

Visual Studio Code extension for C64 coding with Kick Assembler
MIT License
18 stars 4 forks source link

[MacOS] Vice appears to not execute when I run this extension #14

Open ItsCbass opened 3 years ago

ItsCbass commented 3 years ago

Hello there, So recently I've really been interested in developing applications for the Commodore 64 and I heard some really good things about your extension. I went through the process of filling out all the settings and the appropriate paths for the debugger and Vice. However, when I run this extension, Kick Ass and the debugger will run perfectly fine but Vice doesn't run with them at all. Is there any explainable reason for this?

t0maszduda commented 2 years ago

I have the same :(

NickToony commented 1 year ago

Turns out this is a bug in Vice - it doesn't seem to be able to handle the relative path on MacOS. Thanks to this Reddit thread for highlighting the bug: https://old.reddit.com/r/c64/comments/idix66/how_to_open_prg_file_on_vice_for_mac/

For example, the extension runs this command: /Applications/vice/x64sc.app/Contents/MacOS/x64sc -logfile ball.prg-vice.log ./bin/ball.prg which fails

but running this command works as expected: /Applications/vice/x64sc.app/Contents/MacOS/x64sc /Users/nick/c64/code/ball/bin/ball.prg

Perhaps this extension could add a setting for using absolute paths when building and running?

cfwdman commented 8 months ago

I was having the same issue and based on a hint at Need a little help with VSCode and Kick Assembler - Commodore 64 - Lemon64 - Commodore 64 https://www.lemon64.com/forum/viewtopic.php?t=73986 to work on the run.js command
and some testing and this issue I was able to fix this issue with the following modifications in the file

~/.vscode/extensions/captainjinx.kickass-c64-1.5.0/client/commands/run.js

// replace // spawn(config.viceBin, [...args, ...debugArgs, outputFile], spawnOptions); // by spawn(config.viceBin, [...args, ...debugArgs, outputDir + "/" + outputFile], spawnOptions);

it's not a general fix for this issue as it will work for mac only but it's a workaround for me.