nodeguy/website/docs/guides/debugging-in-vscode.md
Atul R eca218ac79
Adds new doc site (#124)
* Adds base template for new docs site

* Adds Apis to docs

* add some css from rn

* Fix right side sidebar functionality

* Basic docs

* adds old docs

* Cleans up unnecessary files

* Chane links

* Adds docusaurus v2

* Styling fixes

* adds wip and new assets

* adds code image

* Add FAQ link

* Adds analytics

* adds cname

* cleanup blogs
2019-09-29 20:14:35 +02:00

40 lines
1.0 KiB
Markdown

---
sidebar_label: Debugging in VSCode
title: Debugging in VSCode
---
- **Open a NodeGui project in VSCode.**
```sh
$ git clone git@github.com:nodegui/nodegui-starter.git
$ code nodegui-starter
```
- **Add a file `.vscode/launch.json` with the following configuration:**
```json
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Qode Process",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/qode",
"windows": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/qode.exe"
},
"args": ["./dist/index.js"],
"outputCapture": "std"
}
]
}
```
**Tip**: You could also configure a preLaunchTask for building typescript before launching the debugger everytime.
- **Debugging**
Set some breakpoints in `index.js`, and start debugging in the [Debug View](https://code.visualstudio.com/docs/editor/debugging). You should be able to hit the breakpoints.