TO debug NestJS code with Chrome dev tool, we can run:

node --inspect-brk dist/rest-api/src/main.js

TO make it easier for us running this later, we can do:

"start:debug": "tsc-watch -p tsconfig.build.json --onSuccess \"node --inspect-brk dist/rest-api/src/main.js\"",

After running this script, you cannot see the endpoint running, this is becasue we need to attach chrome dev tool.

To do that, open a new tab in Chrome,

chrome://inspect

THis helps to attach the chrome dev tool to our NestJS backend.

Then we can reopen the endpoint in tab, we can do the normal debugging as we did in Front end.

[Debug] How to Debug a NestJs Backend using the Chrome Dev Tools的更多相关文章

  1. [Debug] Debug Node.js Application by using Chrome Dev tools

    For example you have a server.js file, and you want to debug some problems; What you can do is: node ...

  2. [D3] Debug D3 v4 with Dev Tools

    Since D3 outputs standard markup, you can use familiar dev tools and inspectors to debug your visual ...

  3. C#在代码中编写输出debug信息-类Debug的使用

    文章:C# 的两种debug 方法 文章:C#跟踪和调试程序-Debug类使用 很全面的文章,可以仔细学习使用下. 文章:C#调试类 没有仔细看. 关键字:Debug类和Trace类有什么区别? 微软 ...

  4. iOS remote debug & Android remote debug & Chrome & APP

    iOS remote debug & Android remote debug & Chrome & APP iOS remote debugging 如何在 iOS 真机上调 ...

  5. Java Tomcat Glassfish Weblogic远程debug(remote debug)

    tomcat ./catalina.sh jpda start 这条命令启动tomcat,它就会监听8000端口,等待调试器的连接. 默认监听8000端口,通过设置环境变量JPDA_ADDRESS指定 ...

  6. eclipse如何远程debug/断开远程debug

    eclipse如何远程debug? 当你的代码已经部署到生产或者测试环境的时候,你如何debug判断线上的问题呢? debug之前必须保证本地代码和远程代码完全一致,否则将不能建立连接 在eclips ...

  7. 用chrome浏览器进行前端debug和停止debug

    首先F12打开控制台: 选择"source","Ctrl+Shift+F"搜索需要debug的代码关键词(Ctrl+O根据文件名搜索): 打开需要debug的文 ...

  8. golang remote debug和docker debug

    在编写 Go 代码的时候,因为很多时候都是需要调试服务器上的代码的,作为一个年长的工程师,肯定不能用 log.Printf 来调试问题,所以我选择了 delve 这个工具,通过 delve 我可以像本 ...

  9. chrome dev debug network 的timeline说明

    在使用chrome的时候F12的开发者工具中有个network,其中对每个请求有个timeline的说明,当鼠标放上去会有下面的显示: 这里面的几个指标在说明在chrome使用文档有说明: 下面我用人 ...

随机推荐

  1. Vivado关联Modelsim进行联合仿真

    Vivado自带仿真工具,但是有点慢,关联Modelsim联合仿真是最好的,注意Modelsim必须是10.7以上版本. 1.安装并成功破解Modelsim 10.7. 2.打开Vivado,点击 T ...

  2. Latex中如何设置字体颜色(三种方式)

    1.直接使用定义好的颜色 \usepackage{color} \textcolor{red/blue/green/black/white/cyan/magenta/yellow}{text} 其中t ...

  3. python 递归-汉诺塔

    # 汉诺塔 a = "A" b = "B" c = "C" def hano(a, b, c, n): if n == 1: print(& ...

  4. 记CentOS 发布.NET Core 2.0

    centos 7.x sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc sudo sh -c 'echo -e & ...

  5. 使用KONG网关实现接口迁移的灰度验证

    在我们对一个API站点进行微服务化的过程中,使用KONG网关可以实现以下几个效果: 1. 业务线无感知,其实内部已经被Kong转到其他站点上执行了,这对业务线特别友好. 2. 可以实现租户级/接口级灰 ...

  6. Fiddler-在fiddlerscript中修改某个请求的请求头内容

    1.进入  OnBeforeRequest函数 在里面添加如下代码 if(oSession.fullUrl.Contains("url")){// //headers中添加测试参数 ...

  7. 自学Python编程的第十一天----------来自苦逼的转行人

    2019-09-21-23:00:26 今天看了很多博客网的博客,看完觉得自己的博客真的是垃圾中的垃圾 新手不知道怎样写博客,我也很想写好一篇能让人看的博客,但是目前水平不够 只能慢慢改,今天的博客还 ...

  8. vscode+phpstudy构建php调试环境

    由于vs code开源和跨平台,而且插件很多,所以打算以后编写和调试php都用vs code. 配置vs code+phpstudy的php调试环境步骤如下: 1.配置phpstudy,其他选项菜单- ...

  9. misc_register杂项设备

    include/linux/miscdevice.h 这些字符设备不符合预先确定的字符设备范畴 设备主设备号10 struct miscdevice { int minor; //次设备号(如果设置为 ...

  10. 随笔小skill

    1.用拉链函数zip()将字典转换成元组对!函数中的两个参数必须是序列!p = {'name':'zhangsanfeng','age':18,'gender':'nan'}print(list(zi ...