vscode中使用js的console配置 - mac
创建一个tasks文件:
使用快捷键 cmd + shift + b, 选择配置任务“,然后”从模板创建tasks.json文件“,然后从列表中选择”其他“。如果没有其他选项,就随便选一个。这样就创建了一个tasks.json文件啦
task.json文件配置
{
"version": "2.0.0",
"tasks": [
{
"label": "console",
"type": "shell",
"osx": {
"command": "/usr/local/bin/node ${file}"
},
"linux": {
"command": "/usr/bin/node ${file}"
},
"windows": {
"command": "C:\\Program Files\\nodejs\\node.exe ${file}"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
编辑之后保存即可。注意版本号,可能有些字段不支持了。
使用
保存后,选择一个js文件,使用快捷键cmd + shift + b,就可以看到js的console啦
相关推荐
Zhongmeishijue 2020-09-10
runner 2020-09-01
梦的天空 2020-08-25
IdeaElements 2020-08-19
luvhl 2020-08-17
移动开发与培训 2020-08-16
ReunionIsland 2020-08-16
lyqdanang 2020-08-16
NARUTOLUOLUO 2020-08-03
MyNameIsXiaoLai 2020-07-08
星辰的笔记 2020-07-04
csstpeixun 2020-06-28
letheashura 2020-06-26
liaoxuewu 2020-06-26
OldBowl 2020-06-26
北京老苏 2020-06-25
Luffyying 2020-06-25