安装准备
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
产品推荐
推荐理由
postman在国内使用已经越来越困难:
- 当电脑打开软件多一点点使用postman就会电脑卡的让人冒烟
- 登录问题严重
- Mock功能服务基本没法使用
- 版本更新功能已很匮乏
- 某些外力因素导致postman以后能否使用风险较大
出于以上考虑因此笔者自己开发了一款api调试开发工具SmartApi,满足基本日常开发调试api需求
官网地址SmartApi
http://www.smartapi.site/
是的,兄弟们,我还是建立了自己的官网!需要下载的大佬直接去官网下载就可以了蛤,顺便看看官网介绍
看下面的简单的