Debugging TypeScript Cordova application in VS 2015 -
a cordova projects' typescript source kept outside of www folder. generated map file points source cannot access. how set post-build event copy typescript source in www folder , update generated mapping file enable debugger load correct typescript source file when breakpoint hit?
figured out first requirement, copying typescript source files www folder. edit .jsproj project file , add following:
<itemgroup>   <typescriptsourcefiles include="$(projectdir)scripts\**\*.ts"></typescriptsourcefiles> </itemgroup>  <target name="afterbuild">   <copy sourcefiles="@(typescriptsourcefiles)" destinationfiles="@(typescriptsourcefiles->'$(projectdir)www\scripts\ts\%(recursivedir)%(filename)%(extension)')"></copy> </target>   now need modify .js.map file , update sourceroot attribute? 
any ideas?
sorry trouble. know have issues source maps , typescript, depending on scenario debugging. best way fix add following setting tsconfig.json file:
"inlinesources": true
this embed typescript sources in source map files can debug them in scenarios.
Comments
Post a Comment