Is it possible to use Visual Studio Code Debugger to debug an Angular Library that has been linked using npm link? Very specifically I am wondering if I can link the debugger to my library's TypeScript Code (not the built js code).
My debugger works fine for the application I am running through the VS Code, however my linked library breakpoints are never hit.
From the research I have done I believe I understand why this is happening (the app using the library does not have the source, it only has the compiled code within node_modules) however I cannot figure out or find any details on how to debug.
Here is an overview of what I have done:
- Angular 7 library built into dist folder.
- I ran
npm link
within the dist folder - I ran
npm link @my/test-lib
in my application, the library shows up in node_modules and the application is able to use it just fine - in angular.json: sourceMap is true, preserveSystemlinks is true, aot is false, vendorSourceMap is true
- tsconfig.json sourceMap is true, enableResourceInlining is true
- vscode launch.json has runtimeArgs set to --preserve-symlinks and --preserve-symlinks-main