-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Issue] [Cordova Tool] Unable to debug with error: "Path must be string. Received null" after upgrade VS Code from 0.10.9 to 0.1010 #48
Comments
Same issue here (with the insider build) |
What version of node do you have installed? Looks like this might be to do with a change in node 5.7 |
My Node version is pretty old 0.10.32. Should I upgrade to latest? |
That is quite old, but shouldn't be related to this particular issue then. I'll investigate further. |
@saravmajestic Could you please try:
|
@digeff I tried all these combinations now and still getting the error. My phonegap version is 5.3.9. I will try to generate a new cordova project and try this out. In the meantime, let me know if you guys have any other work around |
For a workaround, you should be able to specify |
Looks like I may have been mistaken, and that value comes from the webview running the app, not from the launch.json. I still haven't been able to reproduce the issue locally, but if you are willing to help us debug I can walk you through adding some extra logging so we can track down where the issue is:
I suspect that it is these |
@MSLaguana , thanks for detailed steps. I have tried to run debug server and I got this below error: `node debugCordova.js --server=9955
/Users/saravanan/.vscode/extensions/vsmobile.cordova-tools-1.0.3/out/debugger/common/v8Protocol.js:52 Since my node version is old, Map is not available yet. I will see if I can inject it somehow and check. |
I should have realized this would happen after you mentioned your older node version. If you could try to get node 4.X and use that, it should match what vscode uses more closely. If you don't want to update node system wide, you could consider nvm for managing multiple versions of node, or you could download the standalone binaries at https://nodejs.org/dist/v4.3.2/node-v4.3.2-darwin-x64.tar.gz and directly reference the node binary from that. |
@MSLaguana , thanks for the tips I tried these workarounds:
Is there anything else I can do to get some more logs? |
I am also having the same problem. I was using it previously without an issue, but it started after I installed the latest update for VS Code yesterday. |
I added some logging with the steps above (but I changed them a bit ;) This is the result:
In the CordovaDebugAdapter.prototype.launch link the This is what lauchArgs contains:
edit VSCode 0.10.10 |
Where did you add it exactly? I have a presentation on this this afternoon and would love to have this working. |
@burtonsmith in the
I did align them on the left on purpose so you could see :) |
You, sir, are awesome! Thank you @DickvdBrink! This is a great workaround. |
@DickvdBrink awesome. This is working now. Thanks a lot! |
I might create a PR with a fix tonight if @MSLaguana doesn't beat me to it :) |
Had the same problem, adding Thanks @DickvdBrink . |
Thanks a lot for investigating @DickvdBrink ! It seems that in the latest vscode the contract with debug adapters changed. I'll create a fix for new projects, but for anyone hitting this issue, the fix is as above: adding |
This will be fixed for new projects in the next release, until then I'll leave this issue open so anyone else hitting it can find it easily. |
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 cwd attribute for each configuration as described previously ( |
Note I got this error when I deleted the contents of the android and ios folders but left the root "android" and "ios" platform folders intact. Deleting the actual folders fixed it. |
I am getting the error
[cordova-debug-adapter] TypeError: Path must be string. Received null
when trying to debug my phonegap app using "Cordova tools".Steps:
Installed VSCode Version 0.10.9 (0.10.9)
installed cordova extension from extensions gallery
selected Cordova from debug configuration and used default
launch.json
clicked 'Run Android on emulator' Got the error as above.
I tried to add the workaround as mentioned in microsoft/vscode#3625
I tried to set sourceMaps as false and "outDir": "${workspaceRoot}" , but still getting same error.
I don't know which sourcemaps I have to specify as mentioned in the workaround. I am using Mac 10.10.5
Screenshot as below:
The text was updated successfully, but these errors were encountered: