imodeljs / desktop-starter

An iTwin.js Desktop starter app
https://itwinjs.org
MIT License
21 stars 12 forks source link

Cannot debug using vscode #80

Closed kardoka closed 3 years ago

kardoka commented 3 years ago

Greetings, the debugging section in the readme seems to be outdated. There does not seem to be a "Watch All" option in "Terminal" -> "Run Task" or a "Electron: All" debug configuration.

For the tasks, the only two watch tasks are:

For debug configurations, the only electron option is "Electron: Main". There is no "Electron: All" option.

What are the options for debugging this code? Have I missed something?

williamkbentley commented 3 years ago

I cannot reproduce your problem. The Watch All task is in tasks.json. The Electron: All debug compound is in launch.json. In my testing I was able to debug frontend and backend code using these two configurations.

Perhaps your version of VSCode does not support compounds and dependsOn tasks? You could also try clicking "Go back" or "Show All Tasks..." at the bottom of the task select dialog.

kardoka commented 3 years ago

I used the the .json files that @williamkbentley mentioned and it works fine now, thank you! It seems that VSCode did not generate the correct config files in .vscode/. I checked the version and it is the latest one as of now (1.60.0), so the issue should be elsewhere.

williamkbentley commented 3 years ago

Great! Maybe your branch is behind master from when those debug configuration files were created. I believe VSCode reads them directly.