Showing results for 
Search instead for 
Did you mean: 

VSCode GDB Debug - Enable Watchdog Halt




I am not sure how to categorize this problem. I have a custom board that I had done an initial software development cycle on STM32CubeIDE. I am working a newer version in VSCode with the STM32 Extension. Everything is working with the exception of one problem. I am using a watchdog on my MCU (STM32L4R9ZGJ6), which triggers while I have the processor halted. I know how to fix this in CubeIDE (Debugger tab, Enable Suspend Watchdogs) but cannot figure it out on the VSCode/GDB side. Below is the launch.json I have so far:






  "version": "0.2.0",
  "configurations": [
      "cwd": "${workspaceFolder}",
      "executable": "./build/debug/build/test.elf",
      "name": "Debug with ST-Link",
      "request": "launch",
      "type": "cortex-debug",
      "runToEntryPoint": "main",
      "showDevDebugOutput": "none",
      "servertype": "stlink"

      "name": "Launch",
      "type": "cppdbg",
      "request": "launch",
      "cwd": "${workspaceFolder}",
      "program": "${command:cmake.launchTargetPath}",
      "MIMode": "gdb",
      "miDebuggerPath": "${}",
      "miDebuggerServerAddress": "localhost:3333",
      "debugServerPath": "${}",
      "debugServerArgs": "--stm32cubeprogrammer-path ${} --swd --port-number 3333",
      "serverStarted": "Waiting for connection on port .*\\.\\.\\.",
      "stopAtConnect": true,
      "postRemoteConnectCommands": [
          "text": "load build/debug/build/UPADermitron.elf"
      "logging": {
        "engineLogging": true
      "preLaunchTask": "Build",
      "svdPath": "${}/STM32L4R9.svd"





Any help is appreciated! Sorry if this has come up but I have tried to find with no luck.