I've created a NativeScript app with Vue.js using the following guide: https://nativescript-vue.org/en/docs/getting-started/quick-start/
These commands create the following code structure:
I'm trying to debug the app with Visual Studio Code. I installed the NativeScript extension for VS Code. This generated the following launch.json config:
{
"name": "Launch on Android",
"type": "nativescript",
"request": "launch",
"platform": "android",
"appRoot": "${workspaceRoot}",
"sourceMaps": true,
"wtch": true
}
Upon running, the following error is shown:
No project found at or above 'my project root dir' and neither was a --path specified.
When I change the launch.json config to the following (notice the dist directory in appRoot):
{
"name": "Launch on Android",
"type": "nativescript",
"request": "launch",
"platform": "android",
"appRoot": "${workspaceRoot}\\dist",
"sourceMaps": true,
"wtch": true
}
and start debugging, the app launches perfectly, but I'm unable to set any breakpoints in the JavaScript files. This is of course because the dist directory already contains the compiled Android/iOS code, and the JavaScript files reside in the src directory.
How can I debug and set breakpoints using NativeScript, Vue.js and VS Code?
