probe-rs/vscode

Documentation is inaccurate.

curiousmuch opened this issue · 2 comments

Hello!

I've installed the latest release v0.4.0 of the VSC extension w/ the latest version for probe-rs-debugger as specified.
Using the example configuration files - the debugger will never run. Further, there is a missing comma in the second launch example and inconsistencies between the examples (some placed "chip" in the "coreConfigs" and some don't).

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "probe-rs-debug",
            "request": "launch",
            "name": "probe_rs Executable launch example",
            "cwd": "${workspaceFolder}",
            "connectUnderReset": true,
            "speed": 24000, //!MODIFY (or remove)
            "probe": "PID:VID:<Serial>", //!MODIFY (or remove)
            "runtimeExecutable": "probe-rs-debugger",
            "runtimeArgs": [
                "debug"
            ],
            "coreIndex": 0,    // VSCODE COMPLAINS IS INVALID OPTION. 
            "flashingConfig": {
                "flashingEnabled": true,
                "resetAfterFlashing": true,
                "haltAfterReset": true,
            } // MISSING COMMA HERE
            "coreConfigs": [
                {
                    "programBinary": "Relative or fully qualified path to your programBinary", //!MODIFY
                    "chip": "STM32H745ZITx", //!MODIFY
                    "svdFile": "Relative or fully qualified path to your programBinary", //!MODIFY
                }
            ],
            "consoleLogLevel": "Info", //Error, Warn, Info, Debug, Trace 
        }
    ]
}

I was able to start a debug session with the following:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "probe-rs-debug",
            "request": "launch",
            "name": "probe_rs Executable launch example",
            "cwd": "${workspaceFolder}",
            "connectUnderReset": true,
            "speed": 24000, //!MODIFY (or remove)
            // "probe": "PID:VID:<Serial>", //!MODIFY (or remove)
            "runtimeExecutable": "probe-rs-debugger",
            "runtimeArgs": [
                "debug"
            ],
            "flashingConfig": {
                "flashingEnabled": true,
                "resetAfterFlashing": true,
                "haltAfterReset": true,
            },
            "chip": "STM32H723ZGTx", //!MODIFY
            "coreConfigs": [
                {
                    "coreIndex": 0,
                    "programBinary": "target/thumbv7em-none-eabihf/debug/blinky", //!MODIFY
                    // "svdFile": "Relative or fully qualified path to your programBinary", //!MODIFY
                }
            ],
            "consoleLogLevel": "Info", //Error, Warn, Info, Debug, Trace 
        }
    ]
}
```
Please let me know if there is anything else I can do to assist. 

Thanks for catching these. There were some changes in the config and these errors slipped through in the docs.

Fix for this has been submitted in probe-rs/webpage#51