# node-webkit教程(16)調試typescript
> 作者:玄魂
> 來源:[node-webkit教程(16)調試typescript](http://www.cnblogs.com/xuanhun/p/4172300.html)
本文所講的內容同樣適用于chrome瀏覽器。
在chrome的開發人員工具的配置項中,有一個sourcemap的選項,用來配置javascript源碼和生成代碼的關系。如果能在瀏覽器中直接調試typescript代碼,才能讓我們真正體會到typescript開發的快樂。
首先打開chrome開發者工具的配置項,然后查看sources下的Enable source maps選項,如果已經選中,請先取消,然后刷新頁面,再選中,再刷新頁面。

此時我們可以在開發這工具的Sources選項中看到ts文件。

如果你是使用visual studio開發typescript 程序,默認項目是自動生成map文件的。在每一個js文件下會有map文件的注釋說明。

如果沒有生成map文件,到工具下的配置項中,配置typescript就可以了。

現在我們可以在開發者工具中設置斷點了。

是不是很happy呢?
- 中文 Wiki
- 支持列表
- 開始nw.js
- package.json
- 中文教程
- node-webkit學習(1)hello world
- node-webkit學習(2)基本結構和配置
- node-webkit學習(3)Native UI API概覽
- node-webkit學習(4)Native UI API 之window
- node-webkit教程(5)Native UI API 之Frameless window
- node-webkit教程(6)Native UI API 之Menu(菜單)
- node-webkit教程(7)Platform Service之APP
- node-webkit教程(8)Platform Service之Clipboard
- node-webkit教程(9)native api 之Tray(托盤)
- node-webkit教程(10)Platform Service之File dialogs
- node-webkit教程(11)Platform Service之shell
- node-webkit教程(12)全屏
- node-webkit教程(13)gpu支持信息查看
- node-webkit教程(14)禁用緩存
- node-webkit教程(15)當圖片加載失敗的時候
- node-webkit教程(16)調試typescript