Problem with Visual Studio Code debugging

I wanted upload VStest code from youtube tutorial but I have error:

Faild to launch OpenOCD GDB Server: Error: spawn
C:/ModusToolbox_1.0/tools-1.0/bin/openocd.exe ENOENT

I have installed ModusToolbox_1.1

I searched ModusToolbox_1.0 on web but is nowhere
Could you send me this version?
If not, what should I do?

You can use OpenOCD 2.1 which comes with ModusToolbox.

To do this go to SETTINGS: (CTRL ,) or use File > Preferences > Settings

Click User :14 . Go to .json format, click { } :22

Modify the line:
"cortex-debug.openocdPath": "C:/ModusToolbox_1.0/tools/openocd-1.0/bin/openocd.exe",
to
"cortex-debug.openocdPath": "C:/ModusToolbox_1.1/tools/openocd-2.1/bin/openocd.exe",

And if you still like to use the older ModusToolbox, here are the archives.

And this is the latest 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": "CM4 Debug Kitprog",
            "type": "cortex-debug",
            "request": "launch",
            "device": "PSoC6",
            "servertype": "openocd",
            "executable": "${workspaceRoot}/build/MyApp.elf",
            "svdFile": "${workspaceFolder}/config/svd/psoc6_01.svd",
            "windows": {
                "searchDir": [ "C:/ModusToolbox_1.1/tools/openocd-2.1/scripts" ],
            },
            "linux": {  // Assuming modustoolbox is installed in /opt
                "command": "/opt/ModusToolbox_1.1/tools/openocd-2.1/scripts"
            },
            "osx": {
                "searchDir": [ "/Applications/ModusToolbox_1.1/tools/openocd-2.1/scripts" ],
            },
            "configFiles": [
                "${workspaceRoot}/config/debug/CM4_kitprog.cfg"
            ],
            "cwd": "${workspaceRoot}/build",
            "preLaunchTask": "Build All: Debug",
            "preLaunchCommands": [
                "set mem inaccessible-by-default off"
                "mon targets psoc6.cpu.cm4",
                "mon arm semihosting enable"
            ],
            "postLaunchCommands": [
                "set output-radix 16",         // uncomment if you want decimal output instead of hexadecimal
                "tbreak main",
                "mon reset run",
                "mon psoc6 reset_halt",
                "continue"                    // uncomment for breaking at main, comment for breaking at first instruction
                "mon reg"
            ],
            "postRestartCommands": [
                "tbreak main",
                "mon reset run",
                "mon psoc6 reset_halt",
                "continue"                    // uncomment for breaking at main, comment for breaking at first instruction
            ]
        },
        {
            "name": "CM4 Debug J-Link (OCD)",
            "type": "cortex-debug",
            "request": "launch",
            "device": "PSoC6",
            "servertype": "openocd",
            "executable": "${workspaceRoot}/build/MyApp.elf",
            "svdFile": "${workspaceFolder}/config/svd/psoc6_01.svd",
            "windows": {
                "searchDir": [ "C:/ModusToolbox_1.1/tools/openocd-2.1/scripts" ],
            },
            "linux": {  // Assuming modustoolbox is installed in /opt
                "command": "/opt/ModusToolbox_1.1/tools/openocd-2.1/scripts"
            },
            "osx": {
                "searchDir": [ "/Applications/ModusToolbox_1.1/tools/openocd-2.1/scripts" ],
            },
            "configFiles": [
                "${workspaceRoot}/config/debug/CM4_JLink.cfg"
            ],
            "cwd": "${workspaceRoot}/build",
            "preLaunchTask": "Build All: Debug",
            "preLaunchCommands": [
                "set mem inaccessible-by-default off"
                "mon targets psoc6.cpu.cm4",
                "mon arm semihosting enable"
            ],
            "postLaunchCommands": [
                "set output-radix 16",         // uncomment if you want decimal output instead of hexadecimal
                "tbreak main",
                "mon reset run",
                "mon psoc6 reset_halt",
                "continue",                   // uncomment for breaking at main, comment for breaking at first instruction
                "mon reg"
            ],
            "postRestartCommands": [
                "tbreak main",
                "mon reset run",
                "mon psoc6 reset_halt",
                "continue"                    // uncomment for breaking at main, comment for breaking at first instruction
            ]
        },
        {
            "name": "CM4 Debug J-Link",
            "type": "cortex-debug",
            "request": "launch",
            "device": "CY8C6xx7_CM4_sect256KB",
            "servertype": "jlink",
            "cwd": "${workspaceRoot}/build",
            "executable": "MyApp.elf",
            //"debuggerArgs": ["-singlerun -strict -timeout 0 -nogui"],
            "svdFile": "${workspaceFolder}/config/svd/psoc6_01.svd",
            "interface": "swd",
            "preLaunchTask": "Build All: Debug",
            "preLaunchCommands": [
                "set mem inaccessible-by-default off",
                "monitor speed 1000",
                "monitor clrbp",
                "monitor reset 0",
                "monitor halt",
                "monitor regs",
                "monitor speed auto",
                "monitor flash breakpoints 1",
                "monitor semihosting enable"
            ],
            "postLaunchCommands": [
                "monitor clrbp",
                "monitor reset 2",
                "monitor halt",
                "monitor reset 0",
                "tbreak main",
                "monitor regs",
                "continue",             // uncomment for breaking at main, comment for breaking at first instruction
                "monitor halt"          // uncomment for breaking at main, comment for breaking at first instruction
            ],
            "postRestartCommands": [
                "monitor clrbp",
                "monitor reset 2",
                "monitor halt",
                "monitor reset 0",
                "tbreak main",
                "monitor regs",
                "continue",
                "monitor halt",
            ],
        }
    ]
}

Next problem is: Error: Debug Adapter has to be specified, see “interface” command

before that it was notification in visual studio code - something like: file CM4_kitprog.cfg doesn’t exist … button “create new”

I click that button and now I don’t know what to do

I have KitProg 3

CY8CPROTO-062-4343W

Can you put this inside CM4_kitprog.cfg:

source [ find interface/kitprog3.cfg ]
transport select swd
set ENABLE_CM0 0
source [ find target/psoc6.cfg ]
set remotetimeout 5000
puts stderr {Started by VS Code!}
init; reset init
echo "Started by VS Code!"