V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
cs3230524
V2EX  ›  Node.js

调试报错行数不准确

  •  
  •   cs3230524 · 2020-03-07 02:04:33 +08:00 · 3868 次点击
    这是一个创建于 1504 天前的主题,其中的信息可能已经有所发展或是发生改变。
    使用 ts 编写项目,ts-node 启动项目调试,报错的堆栈信息和实际的错误行数对不上咋整?
    3 条回复    2020-03-07 23:04:34 +08:00
    xiaoming1992
        1
    xiaoming1992  
       2020-03-07 02:24:01 +08:00 via Android
    将 devtool 改成 cheap-module-source-map 试试
    cs3230524
        2
    cs3230524  
    OP
       2020-03-07 19:50:50 +08:00
    @xiaoming1992 后端啊,哪里什么 devtool
    xiaoming1992
        3
    xiaoming1992  
       2020-03-07 23:04:34 +08:00
    那是在 tsconfig 里关了 sourceMap?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1870 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 16:21 · PVG 00:21 · LAX 09:21 · JFK 12:21
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.