To generate source maps during compilation, make sure the sourceMap property is set to true. In the Project tool window, select the folder where your TypeScript code is (most often it is the project root folder) and then select New | tsconfig.json File from the context menu. With a tsconfig.json file, you can modify this default behavior to generate source maps and compile only files from a custom scope. The compiler also by default processes either the TypeScript file in the active editor tab or all TypeScript files from the current project. Make sure the TypeScript Language Service checkbox is selected.īy default, the built-in compiler does not create source maps that will let you step through your TypeScript code during a debugging session. Press Control+Alt+S to open the IDE settings and then select Languages & Frameworks | TypeScript. After that the tool window is accessible via View | Tool Windows | TypeScript on the main menu or via the tool window bar. The tool window shows up only after you first compile your TypeScript code manually. This list is not affected by changes you make to your code and is updated only when you invoke compilation again. By default, it outputs generated JavaScript files and sourcemaps next to the TypeScript file.Ĭompilation is invoked with the Compile actions from the TypeScript widget on the Status toolbar as described in Compile TypeScript code below.Ĭompilation errors are reported in the TypeScript Tool Window. WebStorm comes with a built-in TypeScript compiler. Because browsers and Node.js process only JavaScript, you have to compile your TypeScript code before running or debugging it.Ĭompilation can also produce source maps that set correspondence between your TypeScript code and the JavaScript code that is actually executed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |