cortex-debug
cortex-debug copied to clipboard
`targetId` is marked as invaild by vscode when `request=attach`, but not for `request=launch`
Describe the bug
targetId is marked as invaild by vscode when request=attach, but it work for request=launch
To Reproduce Steps to reproduce the behavior:
- Create an launch.json with targetId;
- When "request": "launch", vscode did't report any error to it;
- Change request to attach("request": "attach"), and see vscode report an warn:
Incorrect type. Expected "string | number".
Expected behavior
targetId should work for both request=launch and request=attach
Screenshots
Environment (please complete the following information):
- VSCode: 1.82.1
- Cortex-Debug Version (this extension): v1.12.1
- OS: Windows 10
Please include launch.json
{
"version": "0.2.0",
"configurations": [
{
"cwd": "${workspaceRoot}",
"type": "cortex-debug",
"request": "launch",
"name": "pyocd",
"servertype": "pyocd",
"executable": "build\\Debug\\test.elf",
"runToEntryPoint": "main",
"targetId": "xxx",
"toolchainPrefix": "arm-none-eabi"
},
{
"cwd": "${workspaceRoot}",
"type": "cortex-debug",
"request": "attach",
"name": "pyocd attach",
"servertype": "pyocd",
"executable": "build\\Debug\\test.elf",
"runToEntryPoint": "main",
"targetId": "xxx",
"toolchainPrefix": "arm-none-eabi"
}
}
Attach text from Debug Console
none
Additional context none
It will be fixed in the next patch release. While you got an error in the editor, the targetId still should have worked when starting an attach type session