Closed bonjourjoel closed 7 months ago
I have the exact same problem with the latest version.
I've done further tests since my last comment and was able to identify that it has something to do with cordova-simulate
dependency which was also updated yesterday. I updated the version in package.json from ^1.1.3
(which updates to the latest minor version available 1.2.1
) to 1.1.6
and was able to run the debug session in the browser.
Thanks @bonjourjoel , @seamlink-aalves , it should related to some updates on cordova-simulate, will investigate on this with priority, any updates will comment here. Thanks!
Update: The issue related to new run argument showbrowser
in cordova-simulate, it's not handling cordova-tools passed argument correctly. We will fix this issue on cordova-simulate tomorrow and release new version soon. For the temporary workaround, please try below steps:
C:\Users\xxx\.vscode\extensions\msjsdiag.cordova-tools-2.6.6\node_modules\cordova-simulate\src\browsers\browser.js
showBrowser = true;
at line 20, the new code should be
let showBrowser = opts.showBrowser;
showBrowser = true;
if (!showBrowser) {
return;
}
Please try this and let me know if this workaround is working. Thanks!
@EzioLi01 Thank you for your response I have tested the workaround you proposed and I can tell you that it does not work correctly: It does make the app ready alright, but it sends the event ready twice, which is not correct.
@EzioLi01 Thank you for your response I have tested the workaround you proposed and I can tell you that it does not work correctly: It does make the app ready alright, but it sends the event ready twice, which is not correct.
Thanks for the details, I have tried on my local, but no luck to repro it. I think it should be the separate issue that not related to cordova-simulate changes, I will fix browser launching issue firstly.
I will investigate on this and try to repro it again. Will create a new issue to track it if it's need to fix. Thank you!
https://github.com/microsoft/vscode-cordova/assets/19662219/f39e61ca-d220-4db6-b63c-ff78165cf2c2
@EzioLi01 Ok, i understand. I will add a line in my code to ignore the second event.
Also i attach a trace of the double event bug. This is on the simple example with cordova create test
/ cordova platform add browser
. My machine is windows 10 home Version 22H2 OsBuild 19045.3516 and i have the latest everything installed.
vscode-debugadapter-ddb8f6bb.json.gz
Oh and also it does not happen on my real project. Only on the reproducer. Weird...
Thank you for the trace, will keep an eye on this in the future.
Update: I will start our release process for the cordova-simulate, it should be working fine in next week for cordova-simulate v1.2.2. Will close this issue when related scenario working well in extension.
Hey guys, cordova-simulate 1.2.2 is released, I have checked this issue is no longer existing. Please update your cordova-simulate version to 1.2.2 to fix it. Close this issue, please let me know if you're still facing this.
Hi, it's me again.
Actual Behavior
Expected Behavior
Hint 1
The window with the remote controls is not opening, as it was before. Not that i need it, because it annoys me more than not. But it might be related to this issue.
Hint 2
vscode-debugadapter-7f366dbd.json.gz
Impossible to downgrade
Also i want to add that i can't revert the update. I tried to downgrade the extension, but the bug remains. Once i have made the update, it's impossible to use the extension again, even with an older version. I have also tried to copy the old .vscode/simulate files from an archive before the update, but it doesn't work.
Software versions
Outputs (Include if relevant)