怎么在vscode中调试_在vscode中调试nestjs

本文介绍了如何在Visual Studio Code(VSCode)中调试NestJS应用程序,通过调试可以更有效地定位和解决问题。教程来源于外部链接。
摘要由CSDN通过智能技术生成

怎么在vscode中调试

This article will take a look at three different techniques for debugging a NestJS application with VSCode.

本文将介绍使用VSCode调试NestJS应用程序的三种不同技术。

For a quick introduction to NestJS, check out this article.

有关NestJS的快速介绍, 参阅本文

Visual Studio Code, or VSCode, is a lightweight source code editor with cross-platform support that boasts an impressive variety of features. Among these features is excellent tooling for debugging applications, including built-in support for Node.js and TypeScript.

Visual Studio Code或VSCode是一种轻量级的源代码编辑器,具有跨平台支持,并具有多种功能。 这些功能中包括用于调试应用程序的出色工具,包括对Node.js和TypeScript的内置支持。

While the NestJS documentation is comprehensive, one of the things that it currently does not cover in-depth is debugging.

虽然NestJS文档非常全面,但目前无法深入介绍的内容之一就是调试。

Fortunately for us, VSCode makes it very straightforward to debug both your NestJS application code and tests written using the Jest testing framework. All that’s required is a little bit of tuning.

对我们来说幸运的是,VSCode使调试NestJS应用程序代码和使用Jest测试框架编写的测试变得非常简单。 所需要做的只是一点点调整。

With that in mind, let’s dive in.

考虑到这一点,让我们开始吧。

方法1:启动配置 (Approach #1: Launch Configuration)

The first approach relies on a launch.json file included in a .vscode/ directory in the root of your workspace.

第一种方法依赖于工作区根目录.vscode/目录中包含的launch.json文件。

This JSON file provides configuration information that VSCode uses while figuring out how to debug your application correctly.

此JSON文件提供VSCode在确定如何正确调试应用程序时使用的配置信息。

Check out

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值