如何在VSCode中调试Deno [英] How to debug Deno in VSCode
问题描述
我们如何配置.vscode/launch.json
来调试Deno项目?
How do we configure .vscode/launch.json
to debug Deno projects?
我在configurations
时,VSCode提供的IntelliSense没有提供Deno选项.还是对此有扩展?
The IntelliSense the VSCode provides when I was in configurations
didn't offer an option for Deno. Or is there an extension for this?
推荐答案
您需要根据 deno手册.
创建.vscode/launch.json
用您的实际脚本替换<entry_point>
,然后使用 F5 .
Create .vscode/launch.json
replacing <entry_point>
with your actual script and then F5.
{
"version": "0.2.0",
"configurations": [
{
"name": "Deno",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "deno",
"runtimeArgs": ["run", "--inspect-brk", "-A", "<entry_point>"],
"port": 9229
}
]
}
它将在您在VS Code上设置的断点处停止,在此处尝试过,并且效果很好.
It will stop at the breakpoints you set on VS Code, tried here and it worked fine.
关于VS Code插件:
About the VS Code plugin:
插件的官方支持正在开发中- https://github.com/denoland/vscode_deno/issues/12
Official support in plugin is being worked on - https://github.com/denoland/vscode_deno/issues/12
这篇关于如何在VSCode中调试Deno的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!