No run configuration is required for launching applications with injected TypeScript from JetBrains Rider.
- In the editor, open the HTML file with the TypeScript reference. This HTML file does not necessarily have to be the one that implements the starting page of the application.
- Do one of the following:
- Choose on the main menu or press Alt+F2. Then select the desired browser from the pop-up menu.
- Hover your mouse pointer over the code to show the browser icons bar: Click the icon that indicates the desired browser.
To recognize breakpoints you set in the TypeScript code, JetBrains Rider needs source maps To generate them during compilation, open the tsconfig.json file and make sure the sourceMap property is set to true.
Debugging client-side TypeScript
Most often, you may want to debug a client-side application running on an external development web server, e.g. powered by Node.js.
- Configure and set breakpoints in the TypeScript code.
- Run the application in the development mode. Often you need to run
npm startfor that. When the development server is ready, copy the URL address at which the application is running in the browser - you will need to specify this URL address in the run/debug configuration.
- Choose the newly created configuration in the Select run/debug configuration drop-down list on the toolbar and click Debug . The URL address specified in the run configuration opens in the chosen browser and the Debug window appears.
- In the Debug tool window, proceed as usual: step through the program, stop and resume the program execution, examine it when suspended, view actual HTML DOM, etc.