This code for configure test script to debug.
{
"name": "testproject",
"version": "1.0.0",
"description": "desc",
"main": "index.js",
"type": "module",
"scripts": {
"test": "mocha test.js",
"test_unit": "mocha test_unit.js"
},
}
This is a screenshot of VS Code with Bug Button which starts the test debug. It shows when I move mouse on it.
How I can set a hotkey on this button?

I don't think so? The relevant commands would be
npm.debugScript, but the implementation of both those commands don't seem to be designed for use with keybindings. You can see the source code in https://github.com/microsoft/vscode/blob/078b98804ecf81cc7347a40604f63f4a494c9a71/extensions/npm/src/npmView.ts#L145. The furthest I can get in that direction is something likeAnd at that point you'll run into "
<minified variable name>.getFolderis not a function".If you want keybinding support for this command, you'll probably have to raise a feature-request or raise a PR.
You can, however, at least bind running (not debugging) the task to a keyboard shortcut: