Skip to content

Unwanted information output when issuing commands in Debug Console #1241

Description

@davepregan

Unexpected behavior
When issuing GDB commands in the Debug Console a message of the form below is output after the information
{"output":"","token":31,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}

I have commented out showDevDebugOutput in my launch.json in an attempt to remove this

Expected behavior
GDB commands can be handled in the Debug Console without this message

Screenshots

Image

Environment:

  • Cortex-Debug Version: 1.12.1
  • OS: Windows 11
  • GDB Version: GNU gdb (GNU Tools for STM32 14.3.rel1.20251027-0700) 15.2.90.20241229-git
  • Compiler Toolchain Version: arm-none-eabi-gcc.exe (GNU Tools for STM32 14.3.rel1.20251027-0700) 14.3.1 20250623

launch.json

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Debug Microcontroller - STLink-V3",
            "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
            "serverArgs": [
                "-s",
                "-m", "0",
                "-k",
                "--frequency", "21000",
                "-el", "${workspaceFolder}\\..\\..\\SupportProjects\\MT25Q128A_STM32F746_KAL_AB\\MT25Q128A_STM32F746_KAL_AB.stldr"
            ],
            "gdbPath": "c:/ST/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/arm-none-eabi-gdb.exe",
            "device": "STM32F746",            //MCU used
            "interface": "swd",                 //Interface setup
            "serialNumber": "0051003D3234510533353533",                 //Set ST-Link ID if you use multiple at the same time
            "runToEntryPoint": "main",          //Run to main and stop there
            "v1": false,
            // "showDevDebugOutput": "raw",
           "svdFile": "c:/ST/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.productdb.debug_2.2.400.202601091600/resources/cmsis/STMicroelectronics_CMSIS_SVD/STM32F746.svd",
            "serverpath": "C:\\ST\\STM32CubeIDE_1.16.0\\STM32CubeIDE\\plugins\\com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.win32_2.2.400.202601091506\\tools\\bin\\ST-LINK_gdbserver.exe",
            "armToolchainPath": "c:\\ST\\STM32CubeIDE_1.16.0\\STM32CubeIDE\\plugins\\com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.win32_2.2.400.202601091506\\tools\\bin",
            "stm32cubeprogrammer": "c:\\Program Files\\STMicroelectronics\\STM32Cube\\STM32CubeProgrammer\\bin"
        },
        {
            "name": "Debug Attach mcu",
            "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": "attach",                //Use "attach" to connect to target w/o elf download
            "servertype": "stlink",             //Use stlink setup of cortex-M debug
            "serverArgs": [
                "-s",
                "-m", "0",
                "-k",
                "--frequency", "21000",
                "-el", "${workspaceFolder}\\..\\..\\SupportProjects\\MT25Q128A_STM32F746_KAL_AB\\MT25Q128A_STM32F746_KAL_AB.stldr"
            ],
            "device": "STM32F746",            //MCU used
            "interface": "swd",                 //Interface setup
            "serialNumber": "004C003C3331510833323639",                 //Set ST-Link ID if you use multiple at the same time
            "runToEntryPoint": "main",          //Run to main and stop there
            "svdFile": "{env:STM32F746SVDPath}",         //SVD file to see reisters
            // C:\\ST\\STM32CubeIDE_1.15.0\\STM32CubeIDE\\plugins\\com.st.stm32cube.ide.mcu.productdb.debug_2.1.200.202403061128\\resources\\cmsis\\STMicroelectronics_CMSIS_SVD\\STM32F746.svd
            "v1": false,
            "showDevDebugOutput": "raw",

            /* Will get automatically detected if STM32CubeIDE is installed to default directory
               or it can be manually provided if necessary via the setDebugEnvVars.bat in /scripts .. */
            "serverpath": "${env:serverpath}",
            //c:\\ST\\STM32CubeIDE_1.15.0\\STM32CubeIDE\\plugins\\com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.win32_2.1.200.202401191126\\tools\\bin\\ST-LINK_gdbserver.exe
            "armToolchainPath": "${env:armToolchainPath}",
            //c:\\ST\\STM32CubeIDE_1.15.0\\STM32CubeIDE\\plugins\\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.100.202403111256\\tools\\bin
            "stm32cubeprogrammer": "${env:stm32cubeprogrammer}",
            //c:\\Program Files\\STMicroelectronics\\STM32Cube\\STM32CubeProgrammer\\bin

            /* If you use external loader, add additional arguments */
            //"serverArgs": ["--extload", "path/to/ext/loader.stldr"]
        },
        {
            "name": "VCU UT Debug",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/build/tests/Debug/tests/vcu_test.exe",
            "args": [],
            "stopAtEntry": true,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": true,
            "MIMode": "gdb",
            "miDebuggerPath": "C:/msys64/mingw64/bin/gdb.exe",
            "setupCommands": [
            {
                "description": "Enable pretty-printing for gdb",
                "text": "-enable-pretty-printing",
                "ignoreFailures": true
            },
            {
                "description": "Set Disassembly Flavor to Intel",
                "text": "-gdb-set disassembly-flavor intel",
                "ignoreFailures": true
            }
            ]
        }
    ]
}

Text from Debug Console
Attached as file

cortex_debug_dump.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions