Skip to content

setting "preLaunchTask" leads to error "Cannot read properties of undefined (reading 'kind')" #246889

@freshmozart1

Description

@freshmozart1

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.100.0-insider (Universal)
  • OS Version: Darwin arm64 24.5.0

Steps to Reproduce:

  1. Setup a Node project
  2. Add a script like "dev": "theansweris 42" to scripts in package.json
  3. Add a launch configuration like this:
{
            "name": "Chrome Launch",
            "type": "chrome",
            "request": "launch",
            "url": "http://localhost:3000",
            "preLaunchTask": "npm: dev",
            "webRoot": "${workspaceFolder}"
}

  1. Try running the launch configuration and get this error as a pop-up:
Cannot read properties of undefined (reading 'kind')

This must be a problem with "preLaunchTask", because when I removed "preLaunchTask", Chrome started as expected. I also recognized that VS Code does not add newly added tasks in tasks.json to the IntelliSense drop-down and whenever I tried to add a custom task from tasks.json to "preLaunchTask", I get the same error.

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugconfirmation-pendinginfo-neededIssue requires more information from posterinsiders-releasedPatch has been released in VS Code InsiderstasksTask system issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions