cortex-debug icon indicating copy to clipboard operation
cortex-debug copied to clipboard

Cannot modify variables while debugging

Open rohinidr opened this issue 2 years ago • 5 comments

Please make you search through our existing issues (both open and closed)

Please visit the correct repo to file an issue. If this is an issue with

Describe the bug VS Code version 1.83.1 Cortex debug After downloading the code to STM device , I am trying to modify one of the static variables during debugging . It fails to updated the variables from Variable window but can modify this variable using terminal . Attached is the snapshot of the error image

  • Cortex-Debug Version : v1.12.1
  • OS: Linux Ubuntu 22.04
  • Compiler Toolchain Version: arn-none-eabi V 11.1
{
    "version": "0.2.0",
    "configurations": [
        {
            "liveWatch": {
                "enabled": true,
                "samplesPerSecond": 4
            },
            "name": "Debug Microcontroller - STLink-V2",
            "cwd": "${workspaceFolder}",        // Path from where commands are executed
            "type": "cortex-debug",             // Debug 
            "executable": "${command:cmake.launchTargetPath}", //or fixed file path: build/project-name.elf
            "request": "launch",                // Use "attach" to connect to target w/o elf download
            "servertype": "stlink",             // Use stlink setup of cortex-M debug
            "device": "STM32G473VEH6",          // MCU used
            "interface": "swd",                 // Interface setup
            "runToEntryPoint": "main",          // Run to main and stop there
            "svdFile": "STM32G473xx.svd",         // SVD file to see registers
            "v1": false,
            "gdbPath": "arm-none-eabi-gdb-py",
            "objdumpPath": "arm-none-eabi-objdump",
            "showDevDebugOutput": "none",     // Debug output
            "debuggerArgs": [
                "-iex",
                "set auto-load safe-path /",
            ],
            "preLaunchCommands": [
                "-enable-pretty-printing",
            ]
        }
    ]
}

Could not set variable: Variable object not found (from var-assign stopped_state_status 0x01)

rohinidr avatar Nov 03 '23 22:11 rohinidr

Thank you for reporting this issue. We can duplicate this and we are actively working on a fix.

haneefdm avatar Nov 21 '23 19:11 haneefdm

The fix has been pushed to this repo. If you have the time to try it out, I can make a private build you can download from GitHub.

Note that it has other unrelated changes we are testing. We will make an official release after the holidays (late Nov)

Thanks again for reporting this issue

haneefdm avatar Nov 22 '23 18:11 haneefdm

Thanks for taking care of the issue . I can test it out in couple of days . Let me know when you have the build ready . Thanks

rohinidr avatar Nov 22 '23 19:11 rohinidr

Hello, Has the fix for this issue been released officially ? I am encountering the same problem.

phb98 avatar Feb 01 '24 17:02 phb98