rolandshacks / vs64

C64 Development Environment for Visual Studio Code
Other
103 stars 18 forks source link

Vice not launching when building #47

Closed Esshahn closed 1 year ago

Esshahn commented 1 year ago

I must be missing something obvious, here....

launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "vice",
            "request": "attach",
            "name": "Attach Vice",
            "hostname": "localhost",
            "port": 6502,
            "preLaunchTask": "${defaultBuildTask}"
        },
        {
            "type": "vice",
            "request": "launch",
            "name": "Launch Vice",
            "preLaunchTask": "${defaultBuildTask}"
        },
    ]
}

tasks.json

{
    "tasks": [
        {
            "type": "vs64",
            "action": "build",
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "label": "build project"
        }
    ]
}

project-config.json

{
    "name": "c64-vscode-test",
    "description": "Project c64-vscode-test",
    "toolkit": "acme",
    "sources": [
        "src/main.asm"
    ],
    "build": "debug",
    "definitions": [],
    "includes": [
    ],
    "args": [],
    "compiler": ""
}

Path to Vice: /Applications/vice-arm64-gtk3-3.7.1/x64sc.app/Contents/MacOS/ also tried /Applications/vice-arm64-gtk3-3.7.1/ /Applications/vice-arm64-gtk3-3.7.1/x64sc.app /Applications/vice-arm64-gtk3-3.7.1/x64sc.app/Contents/MacOS/x64sc

I'm expecting to launch Vice to launch after the build succeeded when clicking the Build button in the footer of VSCode. Is that assumption correct?

Thank you for your support, this is a great project! Also, thank you for including the spritemate format <3 With spritemate, PyDisass6502 and the ACME assembly vscode template ( https://github.com/Esshahn/acme-assembly-vscode-template ) I did play around with similar projects, but this seems to be far better.

rolandshacks commented 1 year ago

Hi.

Running build tasks and launching are different steps. While it is possible to add a "preLaunchTask" build step to be executed when launching, it (to my knowledge) is not possible to automatically launch a configuration after a build task.

In short:

Hope that helps!

Esshahn commented 1 year ago

Ah, I see. My bad then, I'll check if it works. I was used to building/crunching/launching in a single step (it's what the vscode template linked above does). Cheers!