debugger: Fix issues with debugging scripts from package.json (#32995)

- [x] Pass in cwd
- [x] Use the appropriate package manager
- [x] Don't mix up package.json and composer.json

Release Notes:

- debugger: Fixed wrong arguments being passed to the DAP when debugging
scripts from package.json.
This commit is contained in:
Cole Miller
2025-06-19 14:33:24 +00:00
committed by GitHub
parent e914d84f00
commit 0b228ad12c
5 changed files with 182 additions and 153 deletions
+2 -1
View File
@@ -29,8 +29,9 @@ impl DapLocator for NodeLocator {
return None;
}
if build_config.command != TYPESCRIPT_RUNNER_VARIABLE.template_value()
&& build_config.command != "composer"
&& build_config.command != "npm"
&& build_config.command != "pnpm"
&& build_config.command != "yarn"
{
return None;
}