Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

targetId is marked as invaild by vscode when request=attach, but not for request=launch #930

Open
yyjdelete opened this issue Sep 14, 2023 · 1 comment

Comments

@yyjdelete
Copy link

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:

  1. Create an launch.json with targetId;
  2. When "request": "launch", vscode did't report any error to it;
  3. 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
image

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

@haneefdm
Copy link
Collaborator

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

haneefdm added a commit that referenced this issue Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants