Debugging when using -out flag to combine all TS files into one final .js

Topics: General
Dec 6, 2012 at 5:43 PM

Hello,

Can't get debugging to work when using the tsc -out flag to combine all TS files into one final .js file. I'm using this Pre-build Event in VS to compile:

"tsc app.ts -out _app.js -target ES5 --sourcemap"

Any suggestions?

---bjorn

 

Dec 6, 2012 at 7:58 PM

What's on 17th line of your TypeScript?

Coordinator
Dec 6, 2012 at 10:19 PM

When you're debugging from VS, are you debugging from a project that references _app.js and app.ts?  There's a limitation in the current debugging experience where it relies on the user to provide the project that is being debugged. 

If you're providing them but still not seeing any debugging working, can you check to see if there is a "//@ sourceMappingURL=..." line at the bottom of the .js files you're debugging.  Earlier version of Web Essentials, for example, would conflict with the debug setting in VS and output .js files which didn't have the source mapping line.


Dec 6, 2012 at 11:10 PM
I’m debugging from a project referencing both files. (I created a new TS project and copied the files into it) The source map is referenced in the _app.js file.
I manually added a dependency (<DependentUpon>) between the app.ts and the _app.js file to the csproj file.
---bjorn

From: [email removed]
Sent: Thursday, December 06, 2012 2:19 PM
To: [email removed]
Subject: Re: Debugging when using -out flag to combine all TS files into one final .js [typescript:405844]

From: jonturner

When you're debugging from VS, are you debugging from a project that references _app.js and app.ts? There's a limitation in the current debugging experience where it relies on the user to provide the project that is being debugged.

If you're providing them but still not seeing any debugging working, can you check to see if there is a "//@ sourceMappingURL=..." line at the bottom of the .js files you're debugging. Earlier version of Web Essentials, for example, would conflict with the debug setting in VS and output .js files which didn't have the source mapping line.


Dec 7, 2012 at 1:32 PM

Bjorn, I think you should try to delete *.js files that depend on *.ts and clean up the folder from the old files such as .js and etc and then check if you're using the right reference from the html page. You need only single .js file, so, everything works fine at least on clean project I've just created :-)

Coordinator
Dec 12, 2012 at 6:13 PM

Would it be possible for you to email me a zip of the project (or a reduced version thereof) so I can investigate? Thanks!

Dec 12, 2012 at 6:50 PM
Of course. Which email address should I use?
---bjorn

From: [email removed]
Sent: Wednesday, December 12, 2012 10:13 AM
To: [email removed]
Subject: Re: Debugging when using -out flag to combine all TS files into one final .js [typescript:405844]

From: RyanCavanaugh

Would it be possible for you to email me a zip of the project (or a reduced version thereof) so I can investigate? Thanks!

Coordinator
Dec 12, 2012 at 7:14 PM

ryan.cavanaugh@microsoft.com. Thanks!