Hello,
first some Informations about the system:
Ionic version:
Ionic:
Ionic CLI : 5.2.6 (C:\Users*****\AppData\Roaming\nvm\v10.16.3\node_modules\ionic)
Ionic Framework : @ionic/angular 4.8.0
@angular-devkit/build-angular : 0.801.3
@angular-devkit/schematics : 8.1.3
@angular/cli : 8.1.3
@ionic/angular-toolkit : 2.0.0
Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 4 other plugins)
Utility:
cordova-res : 0.6.0
native-run : 0.2.8
System:
Android SDK Tools : 26.1.1 (C:\Users*****\AppData\Local\Android\Sdk)
NodeJS : v10.16.3 (C:\Program Files\nodejs\node.exe)
npm : 6.9.0
OS : Windows 10
Steps to reproduce:
ionic start myApp tabs
Start emulator
ionic cordova run android
Start debugging
My launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
“version”: “0.2.0”,
“configurations”: [
{
“name”: “Run Android on device”,
“type”: “cordova”,
“request”: “launch”,
“platform”: “android”,
“target”: “device”,
“port”: 9222,
“sourceMaps”: true,
“cwd”: “{workspaceFolder}",
"ionicLiveReload": false
},
{
"name": "Run iOS on device",
"type": "cordova",
"request": "launch",
"platform": "ios",
"target": "device",
"port": 9220,
"sourceMaps": true,
"cwd": "{workspaceFolder}”,
“ionicLiveReload”: false
},
{
“name”: “Attach to running android on device”,
“type”: “cordova”,
“request”: “attach”,
“platform”: “android”,
“target”: “device”,
“port”: 9222,
“sourceMaps”: true,
“cwd”: “{workspaceFolder}"
},
{
"name": "Attach to running iOS on device",
"type": "cordova",
"request": "attach",
"platform": "ios",
"target": "device",
"port": 9220,
"sourceMaps": true,
"cwd": "{workspaceFolder}”
},
{
“name”: “Run Android on emulator”,
“type”: “cordova”,
“request”: “launch”,
“platform”: “android”,
“target”: “emulator”,
“port”: 9222,
“sourceMaps”: true,
“cwd”: “{workspaceFolder}",
"ionicLiveReload": false
},
{
"name": "Attach to running android on emulator",
"type": "cordova",
"request": "attach",
"platform": "android",
"target": "emulator",
"port": 9222,
"sourceMaps": true,
"cwd": "{workspaceFolder}/src”
},
{
“name”: “Serve to the browser (ionic serve)”,
“type”: “cordova”,
“request”: “launch”,
“platform”: “serve”,
“cwd”: “{workspaceFolder}",
"devServerAddress": "localhost",
"sourceMaps": true,
"ionicLiveReload": true
},
{
"name": "Simulate Android in browser",
"type": "cordova",
"request": "launch",
"platform": "android",
"target": "chrome",
"simulatePort": 8000,
"livereload": true,
"sourceMaps": true,
"cwd": "{workspaceFolder}”
},
{
“name”: “Simulate iOS in browser”,
“type”: “cordova”,
“request”: “launch”,
“platform”: “ios”,
“target”: “chrome”,
“simulatePort”: 8000,
“livereload”: true,
“sourceMaps”: true,
“cwd”: “{workspaceFolder}"
},
{
"name": "Run Browser",
"type": "cordova",
"request": "launch",
"platform": "browser",
"target": "chrome",
"simulatePort": 8000,
"livereload": true,
"sourceMaps": true,
"cwd": "{workspaceFolder}”
}
]
}
Vs Code Version:
1.37.1
Cordova Tools Version:
1.8.5
The Problem now is:
It’s not possible for me, to debug in Vs Code anymore.
I can attach to the emulator, but the breakpoints are all unveryfied. I have the same behaviour in Windows 10 and in Ubuntu 18.04.
With Ionic 3 I hadn’t these problems.
I found out, that ionic 4 doesn`t use app scripts anymore. So the sourcemap files are not in the .sourcemaps folder in the root now, but in the www folder.
I tried
“cwd”: “${workspaceFolder}/src”
or
“cwd”: “{workspaceFolder}/www"
in
{
"name": "Attach to running android on emulator",
"type": "cordova",
"request": "attach",
"platform": "android",
"target": "emulator",
"port": 9222,
"sourceMaps": true,
"cwd": "{workspaceFolder}”
},
but that didn`t work, either.
Can somebody help me here please? What can I do to male the breakpoints verified?
Thanks for your help.
David