nativescript-vscode-extension
nativescript-vscode-extension copied to clipboard
Debugger errors out with ts_helpers.js not found and crashes on file change
When trying to run debugger in VSC with stopOnEntry: true debugger throws the following error and stops.
Unable to open 'ts_helpers.js': File not found (file:///data/data/com.appxxx/files/internal/ts_helpers.js).
I’m not sure where this path is set so i looked in the file systems and found a couple of similar folders
/home/xxx/dev/appxxx/platforms/android/app/build/intermediaries/assets/debug/internal /home/xxx/dev/appxxx/platforms/android/app/src/main/assets/internal
When VSC shows the error it also offers to create the missing file. When clicked it also errors out with the “Permissions denied” error.
I’ve changed permissions on the above folders and contained files to 777 (wide open to all) but with the same result.
If i ignore the error messages above and attempt to walk through the application in debugger it works one time but throws bundle.js not found error. Searching for that file yield the following folders
/home/zzz/dev/appxxx/platforms/android/app/build/intermediates/assets/debug/app/bundle.js /home/zzz/dev/appxxx/platforms/android/app/src/main/assets/app/bundle.js
changing file permissions to 777 does not change anything.
Any file change reloads the app but then the application crashes on topmost().currentEntry being null, which is strange because it works fine the first time through. So at this point debugger has to be shutdown and restarted on every change since it doesn't work with livesync.
Debugger worked fine until recently. Not sure what happened to change that but now it does slow down development a great deal.
launch.json
{
"name": "Launch on Android",
"type": "nativescript",
"request": "launch",
"platform": "android",
"appRoot": "${workspaceRoot}",
"sourceMaps": true,
// "stopOnEntry": true,
"watch": true,
"sourceMapPathOverrides": {
"webpack:///*": "${workspaceRoot}/app/*"
},
"tnsArgs": [
"--bundle",
"--debug-brk",
"--emulator"
]
},
package.json
{
"name": "xxxxx",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"version": "0.1.0",
"nativescript": {
"id": "xxxxxr",
"tns-android": {
"version": "4.2.0"
}
},
"scripts": {
"lint": "tslint \"app/**/*.ts\""
},
"dependencies": {
"moment": "^2.22.2",
"nativescript": "^4.2.4",
"nativescript-cardview": "^3.1.0",
"nativescript-checkbox": "^3.0.3",
"nativescript-doorbell.io": "0.0.3",
"nativescript-feedback": "^1.1.2",
"nativescript-plugin-firebase": "^7.1.0",
"nativescript-purchase": "^2.0.5",
"nativescript-theme-core": "^1.0.4",
"nativescript-ui-dataform": "^3.5.2",
"nativescript-ui-listview": "^3.5.4",
"nativescript-ui-sidedrawer": "^3.5.2",
"tns-core-modules": "^4.2.1"
},
"devDependencies": {
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"lazy": "1.0.11",
"nativescript-dev-sass": "^1.6.0",
"nativescript-dev-typescript": "^0.7.4",
"nativescript-dev-webpack": "^0.15.1",
"tslint": "5.8.0",
"typescript": "^3.1.1"
}
}
webpack.config.js is generated by the nativescript-dev-webpack and there are no customizations.