I was trying to fix a bug in angular-core repository. I have build the project with bazel successfully on my local and got a dist/
folder.
I want to debug
this file, For example: Add some console.log()
statements to print values of variables. https://github.com/angular/angular/blob/master/packages/compiler/src/parse_util.ts
What is the best way to debug code of this file. I am using tsc filename
and then tryting to run the compiled js via Node.js
. I am getting errors as the compiles js contains import
and export
statements not supported by Node.js.
Any Angular Core developer who can give me some help in it. I will be very thankful to him.
Thanks
One way is to use ts-node
( https://github.com/TypeStrong/ts-node ), to execute the file.
Something like this should work:
ts-node index.js --inspect
Use the output to debug the application in chrome.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.