如何在产品服务器中调试Angular? [英] How to debug Angular in prod server?

查看:112
本文介绍了如何在产品服务器中调试Angular?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开发环境中,我可以使用Chrome source选项卡进行调试,但是在生产服务器中,运行ng build --prod后我会使用dist文件夹内容.此文件夹包含已编译的代码,因此,如果生产中存在问题,我将不知道如何调试才能找到问题.

In the development environment I can debug with the Chrome source tab , but in the prod server I use the dist folder content after running ng build --prod. This folder contains compiled code so if there is a problem in the production I don't know how to debug to find the problem.

是否可以通过生产编译代码进行调试?

Is it possible to debug through the production compiled code ?

推荐答案

更新: 您可以尝试ng build --prod --sourcemap

对于以前的angular-2版本,它可以工作,ng build --prod --sourcemap

For the previous versions of angular-2 this would work , ng build --prod --sourcemap

这篇关于如何在产品服务器中调试Angular?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆