Chrome browser Debug Typescript

Source: Internet
Author: User
Tags chrome developer chrome developer tools

In the configuration item for the Chrome developer tool, there is a sourcemap option to configure the JavaScript source and generate code relationships.

If you can debug the typescript code directly in the browser, we can really appreciate the joy of typescript development.

First open the Chrome developer tools configuration item, and then look at the Enable Source maps option under Sources,

If it is already selected, please cancel first, then refresh the page, select it, and then refresh the page.

At this point we can see the TS file in the sources option of developing this tool.

If you are developing a typescript program using Visual Studio, the default project is to generate the map file automatically.

Under each JS file there will be a comment description of the map file.

If you do not generate a map file, you can configure typescript in the configuration item under Tools.

Now we can set breakpoints in the developer tool.

Chrome browser Debug Typescript

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.