Skip to content

Commit 3864d73

Browse files
committed
Add vscode debug support doc
1 parent e30727a commit 3864d73

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

docs/debug.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,36 @@
1-
# How to debug Boostnote (Electron app)
2-
This page is also available in [Japanese](https://github.com/BoostIO/Boostnote/blob/master/docs/jp/debug.md), [Korean](https://github.com/BoostIO/Boostnote/blob/master/docs/ko/debug.md), [Russain](https://github.com/BoostIO/Boostnote/blob/master/docs/ru/debug.md), [Simplified Chinese](https://github.com/BoostIO/Boostnote/blob/master/docs/zh_CN/debug.md), [French](https://github.com/BoostIO/Boostnote/blob/master/docs/fr/debug.md) and [German](https://github.com/BoostIO/Boostnote/blob/master/docs/de/debug.md).
1+
# How to debug BoostNote (Electron app)
32

3+
This page is also available in [Japanese](#)(https://github.com/BoostIO/Boostnote/blob/master/docs/jp/debug.md), [Korean](#)(https://github.com/BoostIO/Boostnote/blob/master/docs/ko/debug.md), [Russain](#)(https://github.com/BoostIO/Boostnote/blob/master/docs/ru/debug.md), [Simplified Chinese](#)(https://github.com/BoostIO/Boostnote/blob/master/docs/zh_CN/debug.md), [French](#)(https://github.com/BoostIO/Boostnote/blob/master/docs/fr/debug.md) and [German](#)(https://github.com/BoostIO/Boostnote/blob/master/docs/de/debug.md).
4+
5+
## Debug with Google Chrome developer Tools
46
Boostnote is an Electron app so it's based on Chromium; developers can use `Developer Tools` just like Google Chrome.
57

68
You can toggle the `Developer Tools` like this:
7-
![how_to_toggle_devTools](https://cloud.githubusercontent.com/assets/11307908/24343585/162187e2-127c-11e7-9c01-23578db03ecf.png)
9+
![how_to_toggle_devTools](#)(https://cloud.githubusercontent.com/assets/11307908/24343585/162187e2-127c-11e7-9c01-23578db03ecf.png)
810

911
The `Developer Tools` will look like this:
10-
![Developer_Tools](https://cloud.githubusercontent.com/assets/11307908/24343545/eff9f3a6-127b-11e7-94cf-cb67bfda634a.png)
12+
![Developer_Tools](#)(https://cloud.githubusercontent.com/assets/11307908/24343545/eff9f3a6-127b-11e7-94cf-cb67bfda634a.png)
1113

1214
When errors occur, the error messages are displayed at the `console`.
1315

14-
## Debugging
16+
### Debugging
1517
For example, you can use the `debugger` to set a breakpoint in the code like this:
1618

17-
![debugger](https://cloud.githubusercontent.com/assets/11307908/24343879/9459efea-127d-11e7-9943-f60bf7f66d4a.png)
19+
![debugger](#)(https://cloud.githubusercontent.com/assets/11307908/24343879/9459efea-127d-11e7-9943-f60bf7f66d4a.png)
1820

1921
This is just an illustrative example, you should find a way to debug which fits your style.
2022

21-
## References
23+
### References
2224
* [Official document of Google Chrome about debugging](https://developer.chrome.com/devtools)
25+
26+
## Debug with Visual Studio Code
27+
28+
1. Install **[Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome "Install Debugger for Chrome")** plugin for Visual Studio Code. Then restart it.
29+
2. Pressing **Shift+Command+B** or running ** Run Build Task** from the global **Terminal** menu, then pick the task named **Build Boostnote**.
30+
3. When above task is running, open **Debug view** in **Activity Bar** on the side of VS Code or use shortcut **Shift+Command+D**.
31+
4. Select the configuration named **Boostnote All** from the **Debug configuration**, then click the green arrow button or press **F5**.
32+
5. Now you should find **Boostnote** is running. You will see two process is running, one named **Boostnote Main**,other named **Boostnote Renderer**. Now you can set **debug breakpoint** in vscode. If you find **breakpoints** is unverified, you need to switch process.
33+
34+
### References
35+
* [Electron application debugging](https://electronjs.org/docs/tutorial/application-debugging)
36+
* [Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome)

0 commit comments

Comments
 (0)