pycharm调试如何返回上一步_如何用Visual Studio Code远程调试运行在服务器上的nodejs应用...

假设我有一个nodejs应用,运行在AWS - 亚马逊云平台上(Amazone Web Service)。我想用本地的Visual Studio Code来远程调试服务器端的nodejs应用。

Visual Studio Code的调试配置里定义了两种类型,attach和launch。Visual Studio Code的官方文档对这两种调试启动行为的解释:

The best way to explain the difference between launch and attach is think of a launch configuration as a recipe for how to start your app in debug mode before VS Code attaches to it,

Launch的意思简而言之就是以debug模式启动app。

while an attachconfiguration is a recipe for how to connect VS Code's debugger to an app or process that's alreadyrunning.

而Attach的含义是将Visual Studio Code的调试器绑定到一个已经处于运行状态的应用。

因为我的需求是用本地的Visual Studio Code去调试AWS上正在运行的nodejs应用,毫无疑问应该选Attach。

点击debug configuration这个按钮:

d838fde606b65035264fb39ff6b3df14.png

自动弹出存放调试配置信息的launch.json文件了:

021c697563e3b82ecd760bbf394b7681.png

把launch.json的内容替换成下面的内容:

```Json

{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值