日日操夜夜添-日日操影院-日日草夜夜操-日日干干-精品一区二区三区波多野结衣-精品一区二区三区高清免费不卡

公告:魔扣目錄網(wǎng)為廣大站長提供免費(fèi)收錄網(wǎng)站服務(wù),提交前請做好本站友鏈:【 網(wǎng)站目錄:http://www.ylptlb.cn 】, 免友鏈快審服務(wù)(50元/站),

點(diǎn)擊這里在線咨詢客服
新站提交
  • 網(wǎng)站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會員:747

環(huán)境:

遠(yuǎn)程系統(tǒng) : deepIn 15.11

本地系統(tǒng):windows 7

nodejs : 12.13.0

1.程序部署

將nodejs程序同時(shí)放到遠(yuǎn)程系統(tǒng)和本地系統(tǒng)

$ tree

.

├── index.js

└── node_modules

    └── express
// index.js

'use strict';

const http = require('http');

const express = require('express')(); // express

const serverPort = 9090;

express.get("/test", function (req, res) {

    console.debug("0_" + req.url);

    res.send('test');

})

//  express

express.get("/*", function (req, res) {

    console.debug("0_" + req.url);

    res.send('*');

})

// Start the server

http.createServer(express).listen(serverPort, function () { // express

    console.log('Your server is listening on port %d (http://localhost:%d)', serverPort, serverPort);

});

2.開啟遠(yuǎn)程調(diào)試

在deepIn中輸入

$ cd /home/dev/Desktop/nodeExpress
$ node --inspect=0.0.0.0:9229 index.js 
Debugger listening on ws://0.0.0.0:9229/41716503-9451-45ca-9866-2a450f93a989
For help, see: https://nodejs.org/en/docs/inspector
Your server is listening on port 9090 (http://localhost:9090)

3.本地vscode配置遠(yuǎn)程調(diào)試

**vscode中打開文件夾本地部署代碼的目錄nodeExpress**

需要配置遠(yuǎn)程ip、端口號、本地代碼目錄、遠(yuǎn)程代碼目錄

{

"version": "0.2.0",

"configurations": [

        {
            "type": "node",
            "request": "attach",
            "name": "Attach to Remote",
            "address": "192.168.129.164",//TCP/IP address of process to be debugged
            "port": 9229,
            "localRoot": "${workspaceFolder}",
            "remoteRoot": "/home/dev/Desktop/nodeExpress",//Absolute path to the remote directory containing the program
            "skipFiles": [
                "<node_internals>/**"
            ]
        }
    ]
}

4.在本地代碼中打斷點(diǎn)調(diào)試

本地代碼需要和遠(yuǎn)程代碼保持一致,不然可能出現(xiàn)斷點(diǎn)不生效的問題

5.結(jié)果

vscode遠(yuǎn)程調(diào)試nodejs

 

分享到:
標(biāo)簽:vscode
用戶無頭像

網(wǎng)友整理

注冊時(shí)間:

網(wǎng)站:5 個(gè)   小程序:0 個(gè)  文章:12 篇

  • 51998

    網(wǎng)站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會員

趕快注冊賬號,推廣您的網(wǎng)站吧!
最新入駐小程序

數(shù)獨(dú)大挑戰(zhàn)2018-06-03

數(shù)獨(dú)一種數(shù)學(xué)游戲,玩家需要根據(jù)9

答題星2018-06-03

您可以通過答題星輕松地創(chuàng)建試卷

全階人生考試2018-06-03

各種考試題,題庫,初中,高中,大學(xué)四六

運(yùn)動步數(shù)有氧達(dá)人2018-06-03

記錄運(yùn)動步數(shù),積累氧氣值。還可偷

每日養(yǎng)生app2018-06-03

每日養(yǎng)生,天天健康

體育訓(xùn)練成績評定2018-06-03

通用課目體育訓(xùn)練成績評定