为何在调试器中执行console.log(Deno.cwd())无输出?
Deno调试无输出问题
我有一个位于path/to/test.ts的简单脚本,代码如下:
console.log(Deno.cwd())
直接通过命令deno run --allow-read .\test.ts运行时一切正常,能正确返回path/to路径。但使用VS Code调试器运行时,程序退出前完全没有任何输出。
当前我的launch.json配置内容如下:
{ "version": "0.2.0", "configurations": [ { "request": "launch", "name": "Deno", "type": "node", "program": "${file}", "cwd": "${workspaceFolder}", "runtimeExecutable": "deno", "runtimeArgs": [ "run", "--allow-read" ], "attachSimplePort": 9229 } ] }
我尝试修改cwd字段的值为${fileDirname}、${workspaceFolder}和${cwd},但都没能解决问题。
内容的提问来源于stack exchange,提问作者Ooker
相关产品推荐
相关产品推荐

