microsoft / vscode-python-tools-extension-template

Template for creating VS Code extensions for python tools.
https://code.visualstudio.com/api/advanced-topics/python-extension-template
Other
138 stars 44 forks source link

Extension debugging (TS) missing breakpoints, not clear it's updating on re-run #205

Closed mawildoer closed 5 months ago

mawildoer commented 5 months ago

Hey folks, thanks for the great template!

I've had a fair bit of trouble trying to debug the extension.

When I run it, or both the extension and Python, it starts a new instance of VSCode and has the extension seemingly present; however, I cannot add breakpoints, and I don't believe changing the source of the extension is having any impact.

I may be misunderstanding the scope of the TX/extension debugging features. Alternatively, some cache of the production extension is stuck somewhere, and I'm still running that.

I would appreciate any ideas to debug!

mawildoer commented 5 months ago

I've worked this one out! It was because the preLaunchTask or npm: watch was failing to start, but that was kinda obscured behind everything.

For me, the solution was to add the following snippet to the definition of it in tasks.json:

"options": {
    "cwd": "${workspaceFolder}/src/vscode-atopile"
}

Leaving this here for anyone in the future