簡體   English   中英

Node.JS + TypeScript 如何從堆棧跟蹤中跟蹤源代碼?

[英]Node.JS + TypeScript how I can track the source code from the stack trace?

As I understand typescript will be transpiled to JavaScript and if something inside of my code will throw an error it will contain the stack trace with line numbers of JavaScript not TypeScript. 是否存在任何庫、插件來解決生產運行實例的這個問題? 我知道對於 web 我們有 map.js 文件與 node.js 類似嗎?

使用ts-node運行您的應用程序,而不是直接使用節點。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM