How to debug a Deno in VsCode

How to debug a Deno in VsCode

In this post we will give you information about How to debug a Deno in VsCode. Hear we will give you detail about How to debug a Deno in VsCodeAnd how to use it also give you demo for it if it is necessary.

we are going to learn about how to debug a deno code using the VsCode editor.

Debugging deno in VsCode

We can debug a deno in vscode by attaching a debugger manually using the launch.json file.

Note: The official support for a debugging via plugin is currently working on click here to know more.

  1. First, open the deno project in vscode.

  2. Create a .vscode folder in the root directory.

  3. Now, create a launch.json file inside the .vscode folder and add the following configuration.

launch.json
{    "version": "0.2.0",    "configurations": [        {            "name": "Deno",            "type": "node",            "request": "launch",            "cwd": "${workspaceFolder}",            "runtimeExecutable": "deno",            "runtimeArgs": ["run", "--inspect-brk", "-A", "<entry-point>"],            "outputCapture": "std",            "port": 9229        }    ]}

In the above code, replace the <entry-point> with the script file path you want to debug for exampleserver.js or app.js.

  1. Add the breakpoints in your script file and start debugging by pressing a shift+cmd+d keyboard shortcut or by clicking a play button in the left side panel.

Hope this code and post will helped you for implement How to debug a Deno in VsCode. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs

For More Info See :: laravel And github

We're accepting well-written guest posts and this is a great opportunity to collaborate : Contact US