Debugging the QuickStart/Custom Module
I have the QuickStart project for the new 2.4.1 HTML Viewer. I'm trying to figure out if I can debug (in a VS 2013/2015 environment) the TypeScript in the "Custom" project. If I understand things correctly, when the Custom project compiles, the build events move the output to the Web Project. I'm able to set breakpoints in the Compliled/Custom.js file in the web project which is a step forward, but I would really like to debug the TypeScript in the Custom project. Is this possible, or am I dreaming?
S
-
I'm I missing something terribly easy, or is there a better way to develop on the HTML5 Viewer.
S
0 -
The QuickStart doesn't currently support Source Maps, which is what would allow you to do that. I've filed an issue to support source maps in both the QuickStart and SDK Samples. For your reference, the ticket for this is GVH-7172.
The issue is that our "Resource Compiler" tool that combines JS injects marker comments between script files in its concatenated output, which ends up altering the line positions.
You may be able to work around this by altering the QuickStart build a bit. First, you'll want to turn on source maps in the Custom project's properties under "TypeScript Build".
Then, you can remove the <Code> block in ResourceManifest.xml. This will stop custom code from being concatenated by the Resource Compiler. That means you will need to append the output of Resource Compiler ("Custom.js") to the raw TypeScript output ("custom_ts_out.js"), and ensure that the result is copied into Custom\Resources\Compiled and that the source map's .map file gets copied there as well.
If you look at the bottom of "custom_ts_out.js", you'll see the reference to the .map. It needs to live alongside the final compiled library.
If you unload and edit the Custom project in VS, you'll see where the build steps are defined.
Hope this helps.
0 -
Thanks Jason 0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare