1

Good morning!

I updated Visual Studio Code yesterday and now my Cordova extension is failing. I am getting this error:

[cordova-debug-adapter] TypeError: Path must be a string. Received undefined

BSmith
  • 123
  • 8

2 Answers2

3

It looks like add the "cwd" attribute to each debug scenario in the .vscode/launch.json file fixed the problem. There is a pull request to get it permanently added to further releases.

{ "version": "0.2.0", "configurations": [ { "name": "Run Android on device", "cwd": "${cwd}", "type": "cordova", "request": "launch", "platform": "android", "target": "device", "port": 9222, "sourceMaps": true },

Additional information https://github.com/Microsoft/vscode-cordova/issues/48

BSmith
  • 123
  • 8
1

A new version of the extension was pushed to the marketplace which addresses this issue. After updating the extension existing projects will need to either include the "cwd": attribute as described above or delete the generated launch.json (if you haven't modified it) so that it can be regenerated correctly.

hamiltonia
  • 2,895
  • 1
  • 9
  • 5