【桌面开发】vscode+Debugger-For-NWjs+nwjs-sdk-vx.x.x-xxos调试环境搭建

在这里插入图片描述

安装准备

1、Debugger for NWjs
2、nwjs-sdk-v0.67.1-osx-x64下载解压(注意存放路径
3、launch.json调试运行文件配置

1、Debugger for NWjs

在VScode 插件里搜索后直接安装即可
使用说明:

Forked from Debugger for Chrome

English is not my mother tongue; please excuse any errors on my part.

Install
Need to install when first run

You can open command palette with F1 or Ctrl + Shift + P

Type nwjs to command palette

Install command

Select version, It takes a little while to open.

Select version

It will start the installation at UserDir/.nwjs/version-names-nwjs. Wait install.

Installing

Launch NWjs

run

Shortcut is F5

Use with multiple version
You can set version in launch.json. Use latest version by default

launchver

You can set version in nwjs.publish.json also.

publishver

Commands
NWjs Install : Download NWjs and install
NWjs Remove : Remove NWjs
NWjs Publish : Generate publish directory and copy NWjs for publish
NWjs Compile : Compile javascript with nwjc
Issues
Debugger will reload the page after attached. This work will run script twice. If you want not to that, Please set reloadAfterAttached to false in launch.json.

This extension use 9223 por.! If you want to change port, please set port field in launch.json.

2、nwjs-sdk-v0.67.1-osx-x64下载

一定要是sdk那个版本
下载地址:https://nwjs.io/
在这里插入图片描述
存放路径:UserDir/.nwjs/version-names-nwjs.
参考笔者的macOS路径:

/Users/lichong/.nwjs/nwjs-sdk-v0.67.1-osx-x64

win路径参考:

C:\Users\Administrator\.nwjs

存放路径要仔细核对,不然就没有调试效果

3、launch.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",
    "configurations": [
        
        {
            "type": "nwjs",
            "request": "launch",
            "name": "Launch NWjs",
            "nwjsVersion": "any",
            "webRoot": "${workspaceFolder}",
            "reloadAfterAttached": true
        }
    ]
}

也可自动生成参考下图:
在这里插入图片描述
如此即可进行编辑后直接点击
在这里插入图片描述
即可看到运行效果
在这里插入图片描述
按F12即可看到熟悉的调试面板

过程比较曲折,资料也不多。下面留下相关参考:
https://blog.csdn.net/holdsky/article/details/103780018

https://blog.csdn.net/yuer5531/article/details/114939904

自研产品推荐

推荐理由

postman在国内使用已经越来越困难:
1、登录问题严重
2、Mock功能服务基本没法使用
3、版本更新功能已很匮乏
4、某些外力因素导致postman以后能否使用风险较大
出于以上考虑因此笔者自己开发了一款api调试开发工具SmartApi,满足基本日常开发调试api需求

简介

历时一年半多开发终于smartApi-v1.0.0版本在2023-09-15晚十点正式上线
smartApi是一款对标国外的postman的api调试开发工具,由于开发人力就作者一个所以人力有限,因此v1.0.0版本功能进行精简,大功能项有:

  • api参数填写
  • api请求响应数据展示
  • PDF形式的分享文档
  • Mock本地化解决方案
  • api列表数据本地化处理
  • 再加上UI方面的打磨

下面是一段smartApi使用介绍:
在这里插入图片描述

下载地址:

https://pan.baidu.com/s/1kFAGbsFIk3dDR64NwM5y2A?pwd=csdn

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

lichong951

你的鼓励决定更新的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值