I'm currently troubleshooting a NodeJS application and its associated typescript packages, which have been linked using `npm link`.
The directory structure is as follows:
/root/package-a # typescript package
/root/package-b # another typescript package
/root/app # NodeJS application
I have established links between the packages and the app in the following manner:
- Issued `npm link` command within each package
- Executed `npm link package-a package-b` in the app's directory
Additionally, in `/root/app/.vscode/launch.json`, I have included the following configuration:
"runtimeArgs": ["--preserve-symlinks"],
"outFiles": [
"${workspaceFolder}/build/**/*.js",
"${workspaceFolder}/../package-a/build/**/*.js",
"${workspaceFolder}/../package-b/build/**/*.js",
]
Despite everything working seamlessly during the build process and changes being correctly reflected between packages and the app while in watch mode, setting breakpoints inside any of the packages in VS Code proves to be challenging. The debugger fails to locate the corresponding TS source, leaving the breakpoint greyed out :-(
https://i.sstatic.net/j2LfN.png
Additionally, each `tsconfig.json` has been configured with `"sourceMap": true`, resulting in `.js.map` files located next to each built file in both the app and the packages.
How can this setup be adjusted to ensure that breakpoints within the packages are displayed in red?