Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .spelling
Original file line numberDiff line numberDiff line change
Expand Up@@ -851,7 +851,6 @@ WDIO
WEAKPTR
WEAKREFCOUNT
weakthis
webdebugger
webdriverio
webhosthidden
Wexceptions
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Remove WebDebugging support",
"packageName": "@react-native-windows/cli",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Remove WebDebugging support",
"packageName": "react-native-windows",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
1 change: 0 additions & 1 deletion docs/inspector.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,6 @@ Hence, we expect most tooling available on other platforms to just work on Windo
1. Initialize React Native Host,
- Turn on `DeveloperSupport`
- Turn on `FastRefresh`
- Turn off `WebDebugger`
- Turn on `Direct Debugging`
2. Ensure Dev-Server is running
3. Start the application
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -56,7 +56,6 @@ function optionSanitizer(key: keyof RunWindowsOptions, value: any): any {
case 'singleproc':
case 'emulator':
case 'device':
case 'remoteDebugging':
case 'logging':
case 'packager':
case 'bundle':
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -40,7 +40,6 @@ export interface RunWindowsOptions {
emulator?: boolean;
device?: boolean;
target?: string;
remoteDebugging?: string;
logging?: boolean;
packager?: boolean;
bundle?: boolean;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,7 +25,6 @@ function validateOptionName(
case 'emulator':
case 'device':
case 'target':
case 'remoteDebugging':
case 'logging':
case 'packager':
case 'bundle':
Expand Down
3 changes: 0 additions & 3 deletions packages/@react-native-windows/cli/src/utils/deploy.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -380,9 +380,6 @@ export async function deployToDesktop(
const vsVersion = Version.fromString(buildTools.installationVersion);

const args = [];
if (options.remoteDebugging) {
args.push('--remote-debugging');
}

if (options.directDebugging) {
args.push('--direct-debugging', options.directDebugging.toString());
Expand Down
6 changes: 0 additions & 6 deletions packages/debug-test/DebuggingFeatures.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -65,7 +65,6 @@ test('debug target properties', async () => {
testLog.message(`executing 'debug target properties' on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -111,7 +110,6 @@ test('enable, disable', async () => {
testLog.message(`executing 'enable, disable' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand All@@ -136,7 +134,6 @@ test('pause, resume', async () => {
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -199,7 +196,6 @@ test('set, remove breakpoint', async () => {
testLog.message(`executing 'set, remove breakpoint' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -246,7 +242,6 @@ test('reload after continue', async () => {
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -285,7 +280,6 @@ test('execution context identifier in Debugger.scriptParsed event', async () =>
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand Down
29 changes: 0 additions & 29 deletions packages/debug-test/PlaygroundAutomation.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -246,9 +246,6 @@ export async function loadPackage(
* Debug settings for the Playground app.
*/
export type DebugSettings = {
// value representing the "Web Debugger" checkbox
webDebugger?: boolean;

// value representing the "Direct Debugging" checkbox
directDebugging?: boolean;

Expand DownExpand Up@@ -292,9 +289,6 @@ export class PlaygroundDebugSettings {
}

private async fetchSettings(settings: DebugSettings) {
const webDebugger = await $$(this.webDebuggerCheckBoxSelector).then(a =>
a[0].isSelected(),
);
const directDebugging = await $$(this.directDebuggingCheckBoxSelector).then(
a => a[0].isSelected(),
);
Expand All@@ -305,18 +299,12 @@ export class PlaygroundDebugSettings {
a[0].getText(),
);

settings.webDebugger = webDebugger;
settings.directDebugging = directDebugging;
settings.debuggerPort = parseInt(debuggerPort, 10);
settings.jsEngine = jsEngine;
}

private async adjustSettings(settings: DebugSettings) {
// Treating the "Web Debugger" check box special as checking it disables the "Debugger Port"
// edit and the "JS Engine" combo.
const webDebuggerCheckBox = (await $$(this.webDebuggerCheckBoxSelector))[0];
let restoreWebDebugger = false;

if (settings.directDebugging !== undefined) {
const directDebuggingCheckBox = (
await $$(this.directDebuggingCheckBoxSelector)
Expand All@@ -329,12 +317,6 @@ export class PlaygroundDebugSettings {
const currentPortText = await debuggerPortEdit.getText();

if (currentPortText !== settings.debuggerPort.toString()) {
if (await webDebuggerCheckBox.isSelected()) {
// enable port number to be changed
await setCheckedState(webDebuggerCheckBox, false);
restoreWebDebugger = true; // restore it later (unless it should be off per settings)
}

await debuggerPortEdit.setValue(settings.debuggerPort);
}
}
Expand DownExpand Up@@ -380,22 +362,11 @@ export class PlaygroundDebugSettings {
`no JS engine specified, leaving at current setting ("${oldJsEngine}")`,
);
}

if (settings.webDebugger !== undefined) {
await setCheckedState(webDebuggerCheckBox, settings.webDebugger);
restoreWebDebugger = false;
}

if (restoreWebDebugger) {
await setCheckedState(webDebuggerCheckBox, true);
}
}

private readonly oldSettings: DebugSettings = {};
private readonly newSettings: DebugSettings;

private readonly webDebuggerCheckBoxSelector =
'./Window/CheckBox[@AutomationId="x_UseWebDebuggerCheckBox"]';
private readonly directDebuggingCheckBoxSelector =
'./Window/CheckBox[@AutomationId="x_UseDirectDebuggerCheckBox"]';
private readonly debuggerPortEditSelector =
Expand Down
2 changes: 0 additions & 2 deletions packages/e2e-test-app/windows/RNTesterApp/App.xaml.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,12 +29,10 @@ public App()
{
#if BUNDLE
JavaScriptBundleFile = "index.windows";
InstanceSettings.UseWebDebugger = false;
InstanceSettings.UseDirectDebugger = false;
InstanceSettings.UseFastRefresh = false;
#else
JavaScriptBundleFile = "app/index";
InstanceSettings.UseWebDebugger = false;
InstanceSettings.UseDirectDebugger = true;
InstanceSettings.UseFastRefresh = true;
#endif
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,11 +23,9 @@ using namespace Windows::ApplicationModel;
App::App() noexcept {
#if BUNDLE
JavaScriptBundleFile(L"index.windows");
InstanceSettings().UseWebDebugger(false);
InstanceSettings().UseFastRefresh(false);
#else
JavaScriptBundleFile(L"index");
InstanceSettings().UseWebDebugger(true);
InstanceSettings().UseFastRefresh(true);
#endif

Expand Down
1 change: 0 additions & 1 deletion packages/playground/CoreApp/App.cpp
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,7 +52,6 @@ int __stdcall wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR /*server*/
app->componentName = L"RNTesterApp";
app->jsBundleFile = LR"(Samples\rntester)";
app->useDeveloperSupport = true;
app->useWebDebugger = false;

#ifdef WITH_MODULES
app->packageProvidersAbiCount = 1;
Expand Down
1 change: 0 additions & 1 deletion packages/playground/CoreApp/app.config.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
// the path to the JS bundle, relative to bundleRootPath. Default value: "index.windows"
"jsBundleFile": "Samples\\rntester",
// "bundleRootPath": "ms-appx:///Bundle/",
"useWebDebugger": false,
// "useFastRefresh": true,
"useDeveloperSupport": true,
// "useDirectDebugger": false,
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -54,7 +54,7 @@ winrt::Windows::UI::Composition::Compositor g_compositor{nullptr};

constexpr auto WindowDataProperty = L"WindowData";

int RunPlayground(int showCmd, bool useWebDebugger);
int RunPlayground(int showCmd);
winrt::Microsoft::ReactNative::IReactPackageProvider CreateStubDeviceInfoPackageProvider() noexcept;

struct WindowData {
Expand DownExpand Up@@ -250,7 +250,7 @@ struct WindowData {
std::thread playgroundThread{([]() {
// For subsequent RN windows do not use the web debugger by default,
// since one instance can be connected to it at a time.
RunPlayground(SW_SHOW, false);
RunPlayground(SW_SHOW);
})};
playgroundThread.detach();
break;
Expand DownExpand Up@@ -497,7 +497,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)

constexpr PCWSTR c_windowClassName = L"MS_REACTNATIVE_PLAYGROUND_COMPOSITION";

int RunPlayground(int showCmd, bool useWebDebugger) {
int RunPlayground(int showCmd) {
constexpr PCWSTR appName = L"React Native Playground (Composition)";

auto windowData = std::make_unique<WindowData>();
Expand DownExpand Up@@ -574,5 +574,5 @@ _Use_decl_annotations_ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE, PSTR
auto playgroundApp{winrt::make<winrt::Playground::implementation::App>()};
#endif

return RunPlayground(showCmd, false);
return RunPlayground(showCmd);
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,7 +42,7 @@ namespace hosting = xaml::Hosting;

constexpr auto WindowDataProperty = L"WindowData";

int RunPlayground(int showCmd, bool useWebDebugger);
int RunPlayground(int showCmd);

HWND GetXamlIslandHwnd(const hosting::DesktopWindowXamlSource &dwxs) {
auto interop = dwxs.as<IDesktopWindowXamlSourceNative>();
Expand All@@ -63,7 +63,6 @@ struct WindowData {
winrt::Microsoft::ReactNative::ReactNativeHost m_host{nullptr};
winrt::Microsoft::ReactNative::ReactInstanceSettings m_instanceSettings{nullptr};

bool m_useWebDebugger{false};
bool m_fastRefreshEnabled{true};
bool m_useDirectDebugger{true};
bool m_breakOnNextLine{false};
Expand DownExpand Up@@ -115,7 +114,6 @@ struct WindowData {

host.InstanceSettings().JavaScriptBundleFile(m_bundleFile);

host.InstanceSettings().UseWebDebugger(m_useWebDebugger);
host.InstanceSettings().UseDirectDebugger(m_useDirectDebugger);
host.InstanceSettings().BundleRootPath(
std::wstring(L"file:").append(workingDir).append(L"\\Bundle\\").c_str());
Expand DownExpand Up@@ -156,7 +154,7 @@ struct WindowData {
std::thread playgroundThread{([]() {
// For subsequent RN windows do not use the web debugger by default,
// since one instance can be connected to it at a time.
RunPlayground(SW_SHOW, false);
RunPlayground(SW_SHOW);
})};
playgroundThread.detach();
break;
Expand DownExpand Up@@ -271,7 +269,6 @@ struct WindowData {
case WM_INITDIALOG: {
auto boolToCheck = [](bool b) { return b ? BST_CHECKED : BST_UNCHECKED; };
auto self = reinterpret_cast<WindowData *>(lparam);
CheckDlgButton(hwnd, IDC_WEBDEBUGGER, boolToCheck(self->m_useWebDebugger));
CheckDlgButton(hwnd, IDC_FASTREFRESH, boolToCheck(self->m_fastRefreshEnabled));
CheckDlgButton(hwnd, IDC_DIRECTDEBUGGER, boolToCheck(self->m_useDirectDebugger));
CheckDlgButton(hwnd, IDC_BREAKONNEXTLINE, boolToCheck(self->m_breakOnNextLine));
Expand All@@ -298,7 +295,6 @@ struct WindowData {
switch (LOWORD(wparam)) {
case IDOK: {
auto self = GetFromWindow(GetParent(hwnd));
self->m_useWebDebugger = IsDlgButtonChecked(hwnd, IDC_WEBDEBUGGER) == BST_CHECKED;
self->m_fastRefreshEnabled = IsDlgButtonChecked(hwnd, IDC_FASTREFRESH) == BST_CHECKED;
self->m_useDirectDebugger = IsDlgButtonChecked(hwnd, IDC_DIRECTDEBUGGER) == BST_CHECKED;
self->m_breakOnNextLine = IsDlgButtonChecked(hwnd, IDC_BREAKONNEXTLINE) == BST_CHECKED;
Expand DownExpand Up@@ -382,7 +378,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)

constexpr PCWSTR c_windowClassName = L"MS_REACTNATIVE_PLAYGROUND_WIN32";

int RunPlayground(int showCmd, bool useWebDebugger) {
int RunPlayground(int showCmd) {
#ifdef USE_WINUI3
constexpr PCWSTR appName = L"React Native Playground (Win32 WinUI3)";
#else
Expand All@@ -401,7 +397,6 @@ int RunPlayground(int showCmd, bool useWebDebugger) {

hosting::DesktopWindowXamlSource desktopXamlSource;
auto windowData = std::make_unique<WindowData>(desktopXamlSource);
windowData->m_useWebDebugger = useWebDebugger;

// We have to use a XAML string here to access the ThemeResource.
// XAML Islands requires us to set the background color to handle theme changes.
Expand DownExpand Up@@ -474,5 +469,5 @@ _Use_decl_annotations_ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE, PSTR
WINRT_VERIFY(classId);
winrt::check_win32(!classId);

return RunPlayground(showCmd, false);
return RunPlayground(showCmd);
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -105,7 +105,6 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSM
CAPTION "Settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL "&Web Debugger",IDC_WEBDEBUGGER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,8,104,10
CONTROL "&Fast Refresh",IDC_FASTREFRESH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,26,104,10
CONTROL "&Direct Debugger",IDC_DIRECTDEBUGGER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,44,104,10
CONTROL "&Break On Next Line",IDC_BREAKONNEXTLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,63,104,10
Expand Down
1 change: 0 additions & 1 deletion packages/playground/windows/playground-win32/resource.h
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
//
#define IDC_PLAYGROUND_WIN32 100
#define IDD_ABOUTBOX 100
#define IDC_WEBDEBUGGER 100
#define IDC_JSBUNDLELIST 100
#define IDM_ABOUT 100
#define IDD_SETTINGSBOX 101
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .spelling
Original file line numberDiff line numberDiff line change
Expand Up@@ -851,7 +851,6 @@ WDIO
WEAKPTR
WEAKREFCOUNT
weakthis
webdebugger
webdriverio
webhosthidden
Wexceptions
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Remove WebDebugging support",
"packageName": "@react-native-windows/cli",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Remove WebDebugging support",
"packageName": "react-native-windows",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
1 change: 0 additions & 1 deletion docs/inspector.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,6 @@ Hence, we expect most tooling available on other platforms to just work on Windo
1. Initialize React Native Host,
- Turn on `DeveloperSupport`
- Turn on `FastRefresh`
- Turn off `WebDebugger`
- Turn on `Direct Debugging`
2. Ensure Dev-Server is running
3. Start the application
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -56,7 +56,6 @@ function optionSanitizer(key: keyof RunWindowsOptions, value: any): any {
case 'singleproc':
case 'emulator':
case 'device':
case 'remoteDebugging':
case 'logging':
case 'packager':
case 'bundle':
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -40,7 +40,6 @@ export interface RunWindowsOptions {
emulator?: boolean;
device?: boolean;
target?: string;
remoteDebugging?: string;
logging?: boolean;
packager?: boolean;
bundle?: boolean;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,7 +25,6 @@ function validateOptionName(
case 'emulator':
case 'device':
case 'target':
case 'remoteDebugging':
case 'logging':
case 'packager':
case 'bundle':
Expand Down
3 changes: 0 additions & 3 deletions packages/@react-native-windows/cli/src/utils/deploy.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -380,9 +380,6 @@ export async function deployToDesktop(
const vsVersion = Version.fromString(buildTools.installationVersion);

const args = [];
if (options.remoteDebugging) {
args.push('--remote-debugging');
}

if (options.directDebugging) {
args.push('--direct-debugging', options.directDebugging.toString());
Expand Down
6 changes: 0 additions & 6 deletions packages/debug-test/DebuggingFeatures.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -65,7 +65,6 @@ test('debug target properties', async () => {
testLog.message(`executing 'debug target properties' on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -111,7 +110,6 @@ test('enable, disable', async () => {
testLog.message(`executing 'enable, disable' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand All@@ -136,7 +134,6 @@ test('pause, resume', async () => {
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -199,7 +196,6 @@ test('set, remove breakpoint', async () => {
testLog.message(`executing 'set, remove breakpoint' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -246,7 +242,6 @@ test('reload after continue', async () => {
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -285,7 +280,6 @@ test('execution context identifier in Debugger.scriptParsed event', async () =>
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand Down
29 changes: 0 additions & 29 deletions packages/debug-test/PlaygroundAutomation.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -246,9 +246,6 @@ export async function loadPackage(
* Debug settings for the Playground app.
*/
export type DebugSettings = {
// value representing the "Web Debugger" checkbox
webDebugger?: boolean;

// value representing the "Direct Debugging" checkbox
directDebugging?: boolean;

Expand DownExpand Up@@ -292,9 +289,6 @@ export class PlaygroundDebugSettings {
}

private async fetchSettings(settings: DebugSettings) {
const webDebugger = await $$(this.webDebuggerCheckBoxSelector).then(a =>
a[0].isSelected(),
);
const directDebugging = await $$(this.directDebuggingCheckBoxSelector).then(
a => a[0].isSelected(),
);
Expand All@@ -305,18 +299,12 @@ export class PlaygroundDebugSettings {
a[0].getText(),
);

settings.webDebugger = webDebugger;
settings.directDebugging = directDebugging;
settings.debuggerPort = parseInt(debuggerPort, 10);
settings.jsEngine = jsEngine;
}

private async adjustSettings(settings: DebugSettings) {
// Treating the "Web Debugger" check box special as checking it disables the "Debugger Port"
// edit and the "JS Engine" combo.
const webDebuggerCheckBox = (await $$(this.webDebuggerCheckBoxSelector))[0];
let restoreWebDebugger = false;

if (settings.directDebugging !== undefined) {
const directDebuggingCheckBox = (
await $$(this.directDebuggingCheckBoxSelector)
Expand All@@ -329,12 +317,6 @@ export class PlaygroundDebugSettings {
const currentPortText = await debuggerPortEdit.getText();

if (currentPortText !== settings.debuggerPort.toString()) {
if (await webDebuggerCheckBox.isSelected()) {
// enable port number to be changed
await setCheckedState(webDebuggerCheckBox, false);
restoreWebDebugger = true; // restore it later (unless it should be off per settings)
}

await debuggerPortEdit.setValue(settings.debuggerPort);
}
}
Expand DownExpand Up@@ -380,22 +362,11 @@ export class PlaygroundDebugSettings {
`no JS engine specified, leaving at current setting ("${oldJsEngine}")`,
);
}

if (settings.webDebugger !== undefined) {
await setCheckedState(webDebuggerCheckBox, settings.webDebugger);
restoreWebDebugger = false;
}

if (restoreWebDebugger) {
await setCheckedState(webDebuggerCheckBox, true);
}
}

private readonly oldSettings: DebugSettings = {};
private readonly newSettings: DebugSettings;

private readonly webDebuggerCheckBoxSelector =
'./Window/CheckBox[@AutomationId="x_UseWebDebuggerCheckBox"]';
private readonly directDebuggingCheckBoxSelector =
'./Window/CheckBox[@AutomationId="x_UseDirectDebuggerCheckBox"]';
private readonly debuggerPortEditSelector =
Expand Down
2 changes: 0 additions & 2 deletions packages/e2e-test-app/windows/RNTesterApp/App.xaml.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,12 +29,10 @@ public App()
{
#if BUNDLE
JavaScriptBundleFile = "index.windows";
InstanceSettings.UseWebDebugger = false;
InstanceSettings.UseDirectDebugger = false;
InstanceSettings.UseFastRefresh = false;
#else
JavaScriptBundleFile = "app/index";
InstanceSettings.UseWebDebugger = false;
InstanceSettings.UseDirectDebugger = true;
InstanceSettings.UseFastRefresh = true;
#endif
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,11 +23,9 @@ using namespace Windows::ApplicationModel;
App::App() noexcept {
#if BUNDLE
JavaScriptBundleFile(L"index.windows");
InstanceSettings().UseWebDebugger(false);
InstanceSettings().UseFastRefresh(false);
#else
JavaScriptBundleFile(L"index");
InstanceSettings().UseWebDebugger(true);
InstanceSettings().UseFastRefresh(true);
#endif

Expand Down
1 change: 0 additions & 1 deletion packages/playground/CoreApp/App.cpp
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,7 +52,6 @@ int __stdcall wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR /*server*/
app->componentName = L"RNTesterApp";
app->jsBundleFile = LR"(Samples\rntester)";
app->useDeveloperSupport = true;
app->useWebDebugger = false;

#ifdef WITH_MODULES
app->packageProvidersAbiCount = 1;
Expand Down
1 change: 0 additions & 1 deletion packages/playground/CoreApp/app.config.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
// the path to the JS bundle, relative to bundleRootPath. Default value: "index.windows"
"jsBundleFile": "Samples\\rntester",
// "bundleRootPath": "ms-appx:///Bundle/",
"useWebDebugger": false,
// "useFastRefresh": true,
"useDeveloperSupport": true,
// "useDirectDebugger": false,
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -54,7 +54,7 @@ winrt::Windows::UI::Composition::Compositor g_compositor{nullptr};

constexpr auto WindowDataProperty = L"WindowData";

int RunPlayground(int showCmd, bool useWebDebugger);
int RunPlayground(int showCmd);
winrt::Microsoft::ReactNative::IReactPackageProvider CreateStubDeviceInfoPackageProvider() noexcept;

struct WindowData {
Expand DownExpand Up@@ -250,7 +250,7 @@ struct WindowData {
std::thread playgroundThread{([]() {
// For subsequent RN windows do not use the web debugger by default,
// since one instance can be connected to it at a time.
RunPlayground(SW_SHOW, false);
RunPlayground(SW_SHOW);
})};
playgroundThread.detach();
break;
Expand DownExpand Up@@ -497,7 +497,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)

constexpr PCWSTR c_windowClassName = L"MS_REACTNATIVE_PLAYGROUND_COMPOSITION";

int RunPlayground(int showCmd, bool useWebDebugger) {
int RunPlayground(int showCmd) {
constexpr PCWSTR appName = L"React Native Playground (Composition)";

auto windowData = std::make_unique<WindowData>();
Expand DownExpand Up@@ -574,5 +574,5 @@ _Use_decl_annotations_ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE, PSTR
auto playgroundApp{winrt::make<winrt::Playground::implementation::App>()};
#endif

return RunPlayground(showCmd, false);
return RunPlayground(showCmd);
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,7 +42,7 @@ namespace hosting = xaml::Hosting;

constexpr auto WindowDataProperty = L"WindowData";

int RunPlayground(int showCmd, bool useWebDebugger);
int RunPlayground(int showCmd);

HWND GetXamlIslandHwnd(const hosting::DesktopWindowXamlSource &dwxs) {
auto interop = dwxs.as<IDesktopWindowXamlSourceNative>();
Expand All@@ -63,7 +63,6 @@ struct WindowData {
winrt::Microsoft::ReactNative::ReactNativeHost m_host{nullptr};
winrt::Microsoft::ReactNative::ReactInstanceSettings m_instanceSettings{nullptr};

bool m_useWebDebugger{false};
bool m_fastRefreshEnabled{true};
bool m_useDirectDebugger{true};
bool m_breakOnNextLine{false};
Expand DownExpand Up@@ -115,7 +114,6 @@ struct WindowData {

host.InstanceSettings().JavaScriptBundleFile(m_bundleFile);

host.InstanceSettings().UseWebDebugger(m_useWebDebugger);
host.InstanceSettings().UseDirectDebugger(m_useDirectDebugger);
host.InstanceSettings().BundleRootPath(
std::wstring(L"file:").append(workingDir).append(L"\\Bundle\\").c_str());
Expand DownExpand Up@@ -156,7 +154,7 @@ struct WindowData {
std::thread playgroundThread{([]() {
// For subsequent RN windows do not use the web debugger by default,
// since one instance can be connected to it at a time.
RunPlayground(SW_SHOW, false);
RunPlayground(SW_SHOW);
})};
playgroundThread.detach();
break;
Expand DownExpand Up@@ -271,7 +269,6 @@ struct WindowData {
case WM_INITDIALOG: {
auto boolToCheck = [](bool b) { return b ? BST_CHECKED : BST_UNCHECKED; };
auto self = reinterpret_cast<WindowData *>(lparam);
CheckDlgButton(hwnd, IDC_WEBDEBUGGER, boolToCheck(self->m_useWebDebugger));
CheckDlgButton(hwnd, IDC_FASTREFRESH, boolToCheck(self->m_fastRefreshEnabled));
CheckDlgButton(hwnd, IDC_DIRECTDEBUGGER, boolToCheck(self->m_useDirectDebugger));
CheckDlgButton(hwnd, IDC_BREAKONNEXTLINE, boolToCheck(self->m_breakOnNextLine));
Expand All@@ -298,7 +295,6 @@ struct WindowData {
switch (LOWORD(wparam)) {
case IDOK: {
auto self = GetFromWindow(GetParent(hwnd));
self->m_useWebDebugger = IsDlgButtonChecked(hwnd, IDC_WEBDEBUGGER) == BST_CHECKED;
self->m_fastRefreshEnabled = IsDlgButtonChecked(hwnd, IDC_FASTREFRESH) == BST_CHECKED;
self->m_useDirectDebugger = IsDlgButtonChecked(hwnd, IDC_DIRECTDEBUGGER) == BST_CHECKED;
self->m_breakOnNextLine = IsDlgButtonChecked(hwnd, IDC_BREAKONNEXTLINE) == BST_CHECKED;
Expand DownExpand Up@@ -382,7 +378,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)

constexpr PCWSTR c_windowClassName = L"MS_REACTNATIVE_PLAYGROUND_WIN32";

int RunPlayground(int showCmd, bool useWebDebugger) {
int RunPlayground(int showCmd) {
#ifdef USE_WINUI3
constexpr PCWSTR appName = L"React Native Playground (Win32 WinUI3)";
#else
Expand All@@ -401,7 +397,6 @@ int RunPlayground(int showCmd, bool useWebDebugger) {

hosting::DesktopWindowXamlSource desktopXamlSource;
auto windowData = std::make_unique<WindowData>(desktopXamlSource);
windowData->m_useWebDebugger = useWebDebugger;

// We have to use a XAML string here to access the ThemeResource.
// XAML Islands requires us to set the background color to handle theme changes.
Expand DownExpand Up@@ -474,5 +469,5 @@ _Use_decl_annotations_ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE, PSTR
WINRT_VERIFY(classId);
winrt::check_win32(!classId);

return RunPlayground(showCmd, false);
return RunPlayground(showCmd);
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -105,7 +105,6 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSM
CAPTION "Settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL "&Web Debugger",IDC_WEBDEBUGGER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,8,104,10
CONTROL "&Fast Refresh",IDC_FASTREFRESH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,26,104,10
CONTROL "&Direct Debugger",IDC_DIRECTDEBUGGER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,44,104,10
CONTROL "&Break On Next Line",IDC_BREAKONNEXTLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,63,104,10
Expand Down
1 change: 0 additions & 1 deletion packages/playground/windows/playground-win32/resource.h
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
//
#define IDC_PLAYGROUND_WIN32 100
#define IDD_ABOUTBOX 100
#define IDC_WEBDEBUGGER 100
#define IDC_JSBUNDLELIST 100
#define IDM_ABOUT 100
#define IDD_SETTINGSBOX 101
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .spelling
Original file line numberDiff line numberDiff line change
Expand Up@@ -851,7 +851,6 @@ WDIO
WEAKPTR
WEAKREFCOUNT
weakthis
webdebugger
webdriverio
webhosthidden
Wexceptions
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Remove WebDebugging support",
"packageName": "@react-native-windows/cli",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Remove WebDebugging support",
"packageName": "react-native-windows",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
1 change: 0 additions & 1 deletion docs/inspector.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,6 @@ Hence, we expect most tooling available on other platforms to just work on Windo
1. Initialize React Native Host,
- Turn on `DeveloperSupport`
- Turn on `FastRefresh`
- Turn off `WebDebugger`
- Turn on `Direct Debugging`
2. Ensure Dev-Server is running
3. Start the application
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -56,7 +56,6 @@ function optionSanitizer(key: keyof RunWindowsOptions, value: any): any {
case 'singleproc':
case 'emulator':
case 'device':
case 'remoteDebugging':
case 'logging':
case 'packager':
case 'bundle':
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -40,7 +40,6 @@ export interface RunWindowsOptions {
emulator?: boolean;
device?: boolean;
target?: string;
remoteDebugging?: string;
logging?: boolean;
packager?: boolean;
bundle?: boolean;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,7 +25,6 @@ function validateOptionName(
case 'emulator':
case 'device':
case 'target':
case 'remoteDebugging':
case 'logging':
case 'packager':
case 'bundle':
Expand Down
3 changes: 0 additions & 3 deletions packages/@react-native-windows/cli/src/utils/deploy.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -380,9 +380,6 @@ export async function deployToDesktop(
const vsVersion = Version.fromString(buildTools.installationVersion);

const args = [];
if (options.remoteDebugging) {
args.push('--remote-debugging');
}

if (options.directDebugging) {
args.push('--direct-debugging', options.directDebugging.toString());
Expand Down
6 changes: 0 additions & 6 deletions packages/debug-test/DebuggingFeatures.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -65,7 +65,6 @@ test('debug target properties', async () => {
testLog.message(`executing 'debug target properties' on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -111,7 +110,6 @@ test('enable, disable', async () => {
testLog.message(`executing 'enable, disable' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand All@@ -136,7 +134,6 @@ test('pause, resume', async () => {
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -199,7 +196,6 @@ test('set, remove breakpoint', async () => {
testLog.message(`executing 'set, remove breakpoint' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -246,7 +242,6 @@ test('reload after continue', async () => {
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -285,7 +280,6 @@ test('execution context identifier in Debugger.scriptParsed event', async () =>
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand Down
29 changes: 0 additions & 29 deletions packages/debug-test/PlaygroundAutomation.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -246,9 +246,6 @@ export async function loadPackage(
* Debug settings for the Playground app.
*/
export type DebugSettings = {
// value representing the "Web Debugger" checkbox
webDebugger?: boolean;

// value representing the "Direct Debugging" checkbox
directDebugging?: boolean;

Expand DownExpand Up@@ -292,9 +289,6 @@ export class PlaygroundDebugSettings {
}

private async fetchSettings(settings: DebugSettings) {
const webDebugger = await $$(this.webDebuggerCheckBoxSelector).then(a =>
a[0].isSelected(),
);
const directDebugging = await $$(this.directDebuggingCheckBoxSelector).then(
a => a[0].isSelected(),
);
Expand All@@ -305,18 +299,12 @@ export class PlaygroundDebugSettings {
a[0].getText(),
);

settings.webDebugger = webDebugger;
settings.directDebugging = directDebugging;
settings.debuggerPort = parseInt(debuggerPort, 10);
settings.jsEngine = jsEngine;
}

private async adjustSettings(settings: DebugSettings) {
// Treating the "Web Debugger" check box special as checking it disables the "Debugger Port"
// edit and the "JS Engine" combo.
const webDebuggerCheckBox = (await $$(this.webDebuggerCheckBoxSelector))[0];
let restoreWebDebugger = false;

if (settings.directDebugging !== undefined) {
const directDebuggingCheckBox = (
await $$(this.directDebuggingCheckBoxSelector)
Expand All@@ -329,12 +317,6 @@ export class PlaygroundDebugSettings {
const currentPortText = await debuggerPortEdit.getText();

if (currentPortText !== settings.debuggerPort.toString()) {
if (await webDebuggerCheckBox.isSelected()) {
// enable port number to be changed
await setCheckedState(webDebuggerCheckBox, false);
restoreWebDebugger = true; // restore it later (unless it should be off per settings)
}

await debuggerPortEdit.setValue(settings.debuggerPort);
}
}
Expand DownExpand Up@@ -380,22 +362,11 @@ export class PlaygroundDebugSettings {
`no JS engine specified, leaving at current setting ("${oldJsEngine}")`,
);
}

if (settings.webDebugger !== undefined) {
await setCheckedState(webDebuggerCheckBox, settings.webDebugger);
restoreWebDebugger = false;
}

if (restoreWebDebugger) {
await setCheckedState(webDebuggerCheckBox, true);
}
}

private readonly oldSettings: DebugSettings = {};
private readonly newSettings: DebugSettings;

private readonly webDebuggerCheckBoxSelector =
'./Window/CheckBox[@AutomationId="x_UseWebDebuggerCheckBox"]';
private readonly directDebuggingCheckBoxSelector =
'./Window/CheckBox[@AutomationId="x_UseDirectDebuggerCheckBox"]';
private readonly debuggerPortEditSelector =
Expand Down
2 changes: 0 additions & 2 deletions packages/e2e-test-app/windows/RNTesterApp/App.xaml.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,12 +29,10 @@ public App()
{
#if BUNDLE
JavaScriptBundleFile = "index.windows";
InstanceSettings.UseWebDebugger = false;
InstanceSettings.UseDirectDebugger = false;
InstanceSettings.UseFastRefresh = false;
#else
JavaScriptBundleFile = "app/index";
InstanceSettings.UseWebDebugger = false;
InstanceSettings.UseDirectDebugger = true;
InstanceSettings.UseFastRefresh = true;
#endif
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,11 +23,9 @@ using namespace Windows::ApplicationModel;
App::App() noexcept {
#if BUNDLE
JavaScriptBundleFile(L"index.windows");
InstanceSettings().UseWebDebugger(false);
InstanceSettings().UseFastRefresh(false);
#else
JavaScriptBundleFile(L"index");
InstanceSettings().UseWebDebugger(true);
InstanceSettings().UseFastRefresh(true);
#endif

Expand Down
1 change: 0 additions & 1 deletion packages/playground/CoreApp/App.cpp
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,7 +52,6 @@ int __stdcall wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR /*server*/
app->componentName = L"RNTesterApp";
app->jsBundleFile = LR"(Samples\rntester)";
app->useDeveloperSupport = true;
app->useWebDebugger = false;

#ifdef WITH_MODULES
app->packageProvidersAbiCount = 1;
Expand Down
1 change: 0 additions & 1 deletion packages/playground/CoreApp/app.config.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
// the path to the JS bundle, relative to bundleRootPath. Default value: "index.windows"
"jsBundleFile": "Samples\\rntester",
// "bundleRootPath": "ms-appx:///Bundle/",
"useWebDebugger": false,
// "useFastRefresh": true,
"useDeveloperSupport": true,
// "useDirectDebugger": false,
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -54,7 +54,7 @@ winrt::Windows::UI::Composition::Compositor g_compositor{nullptr};

constexpr auto WindowDataProperty = L"WindowData";

int RunPlayground(int showCmd, bool useWebDebugger);
int RunPlayground(int showCmd);
winrt::Microsoft::ReactNative::IReactPackageProvider CreateStubDeviceInfoPackageProvider() noexcept;

struct WindowData {
Expand DownExpand Up@@ -250,7 +250,7 @@ struct WindowData {
std::thread playgroundThread{([]() {
// For subsequent RN windows do not use the web debugger by default,
// since one instance can be connected to it at a time.
RunPlayground(SW_SHOW, false);
RunPlayground(SW_SHOW);
})};
playgroundThread.detach();
break;
Expand DownExpand Up@@ -497,7 +497,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)

constexpr PCWSTR c_windowClassName = L"MS_REACTNATIVE_PLAYGROUND_COMPOSITION";

int RunPlayground(int showCmd, bool useWebDebugger) {
int RunPlayground(int showCmd) {
constexpr PCWSTR appName = L"React Native Playground (Composition)";

auto windowData = std::make_unique<WindowData>();
Expand DownExpand Up@@ -574,5 +574,5 @@ _Use_decl_annotations_ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE, PSTR
auto playgroundApp{winrt::make<winrt::Playground::implementation::App>()};
#endif

return RunPlayground(showCmd, false);
return RunPlayground(showCmd);
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,7 +42,7 @@ namespace hosting = xaml::Hosting;

constexpr auto WindowDataProperty = L"WindowData";

int RunPlayground(int showCmd, bool useWebDebugger);
int RunPlayground(int showCmd);

HWND GetXamlIslandHwnd(const hosting::DesktopWindowXamlSource &dwxs) {
auto interop = dwxs.as<IDesktopWindowXamlSourceNative>();
Expand All@@ -63,7 +63,6 @@ struct WindowData {
winrt::Microsoft::ReactNative::ReactNativeHost m_host{nullptr};
winrt::Microsoft::ReactNative::ReactInstanceSettings m_instanceSettings{nullptr};

bool m_useWebDebugger{false};
bool m_fastRefreshEnabled{true};
bool m_useDirectDebugger{true};
bool m_breakOnNextLine{false};
Expand DownExpand Up@@ -115,7 +114,6 @@ struct WindowData {

host.InstanceSettings().JavaScriptBundleFile(m_bundleFile);

host.InstanceSettings().UseWebDebugger(m_useWebDebugger);
host.InstanceSettings().UseDirectDebugger(m_useDirectDebugger);
host.InstanceSettings().BundleRootPath(
std::wstring(L"file:").append(workingDir).append(L"\\Bundle\\").c_str());
Expand DownExpand Up@@ -156,7 +154,7 @@ struct WindowData {
std::thread playgroundThread{([]() {
// For subsequent RN windows do not use the web debugger by default,
// since one instance can be connected to it at a time.
RunPlayground(SW_SHOW, false);
RunPlayground(SW_SHOW);
})};
playgroundThread.detach();
break;
Expand DownExpand Up@@ -271,7 +269,6 @@ struct WindowData {
case WM_INITDIALOG: {
auto boolToCheck = [](bool b) { return b ? BST_CHECKED : BST_UNCHECKED; };
auto self = reinterpret_cast<WindowData *>(lparam);
CheckDlgButton(hwnd, IDC_WEBDEBUGGER, boolToCheck(self->m_useWebDebugger));
CheckDlgButton(hwnd, IDC_FASTREFRESH, boolToCheck(self->m_fastRefreshEnabled));
CheckDlgButton(hwnd, IDC_DIRECTDEBUGGER, boolToCheck(self->m_useDirectDebugger));
CheckDlgButton(hwnd, IDC_BREAKONNEXTLINE, boolToCheck(self->m_breakOnNextLine));
Expand All@@ -298,7 +295,6 @@ struct WindowData {
switch (LOWORD(wparam)) {
case IDOK: {
auto self = GetFromWindow(GetParent(hwnd));
self->m_useWebDebugger = IsDlgButtonChecked(hwnd, IDC_WEBDEBUGGER) == BST_CHECKED;
self->m_fastRefreshEnabled = IsDlgButtonChecked(hwnd, IDC_FASTREFRESH) == BST_CHECKED;
self->m_useDirectDebugger = IsDlgButtonChecked(hwnd, IDC_DIRECTDEBUGGER) == BST_CHECKED;
self->m_breakOnNextLine = IsDlgButtonChecked(hwnd, IDC_BREAKONNEXTLINE) == BST_CHECKED;
Expand DownExpand Up@@ -382,7 +378,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)

constexpr PCWSTR c_windowClassName = L"MS_REACTNATIVE_PLAYGROUND_WIN32";

int RunPlayground(int showCmd, bool useWebDebugger) {
int RunPlayground(int showCmd) {
#ifdef USE_WINUI3
constexpr PCWSTR appName = L"React Native Playground (Win32 WinUI3)";
#else
Expand All@@ -401,7 +397,6 @@ int RunPlayground(int showCmd, bool useWebDebugger) {

hosting::DesktopWindowXamlSource desktopXamlSource;
auto windowData = std::make_unique<WindowData>(desktopXamlSource);
windowData->m_useWebDebugger = useWebDebugger;

// We have to use a XAML string here to access the ThemeResource.
// XAML Islands requires us to set the background color to handle theme changes.
Expand DownExpand Up@@ -474,5 +469,5 @@ _Use_decl_annotations_ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE, PSTR
WINRT_VERIFY(classId);
winrt::check_win32(!classId);

return RunPlayground(showCmd, false);
return RunPlayground(showCmd);
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -105,7 +105,6 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSM
CAPTION "Settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL "&Web Debugger",IDC_WEBDEBUGGER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,8,104,10
CONTROL "&Fast Refresh",IDC_FASTREFRESH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,26,104,10
CONTROL "&Direct Debugger",IDC_DIRECTDEBUGGER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,44,104,10
CONTROL "&Break On Next Line",IDC_BREAKONNEXTLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,63,104,10
Expand Down
1 change: 0 additions & 1 deletion packages/playground/windows/playground-win32/resource.h
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
//
#define IDC_PLAYGROUND_WIN32 100
#define IDD_ABOUTBOX 100
#define IDC_WEBDEBUGGER 100
#define IDC_JSBUNDLELIST 100
#define IDM_ABOUT 100
#define IDD_SETTINGSBOX 101
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .spelling
Original file line numberDiff line numberDiff line change
Expand Up@@ -851,7 +851,6 @@ WDIO
WEAKPTR
WEAKREFCOUNT
weakthis
webdebugger
webdriverio
webhosthidden
Wexceptions
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Remove WebDebugging support",
"packageName": "@react-native-windows/cli",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Remove WebDebugging support",
"packageName": "react-native-windows",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
1 change: 0 additions & 1 deletion docs/inspector.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,6 @@ Hence, we expect most tooling available on other platforms to just work on Windo
1. Initialize React Native Host,
- Turn on `DeveloperSupport`
- Turn on `FastRefresh`
- Turn off `WebDebugger`
- Turn on `Direct Debugging`
2. Ensure Dev-Server is running
3. Start the application
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -56,7 +56,6 @@ function optionSanitizer(key: keyof RunWindowsOptions, value: any): any {
case 'singleproc':
case 'emulator':
case 'device':
case 'remoteDebugging':
case 'logging':
case 'packager':
case 'bundle':
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -40,7 +40,6 @@ export interface RunWindowsOptions {
emulator?: boolean;
device?: boolean;
target?: string;
remoteDebugging?: string;
logging?: boolean;
packager?: boolean;
bundle?: boolean;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,7 +25,6 @@ function validateOptionName(
case 'emulator':
case 'device':
case 'target':
case 'remoteDebugging':
case 'logging':
case 'packager':
case 'bundle':
Expand Down
3 changes: 0 additions & 3 deletions packages/@react-native-windows/cli/src/utils/deploy.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -380,9 +380,6 @@ export async function deployToDesktop(
const vsVersion = Version.fromString(buildTools.installationVersion);

const args = [];
if (options.remoteDebugging) {
args.push('--remote-debugging');
}

if (options.directDebugging) {
args.push('--direct-debugging', options.directDebugging.toString());
Expand Down
6 changes: 0 additions & 6 deletions packages/debug-test/DebuggingFeatures.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -65,7 +65,6 @@ test('debug target properties', async () => {
testLog.message(`executing 'debug target properties' on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -111,7 +110,6 @@ test('enable, disable', async () => {
testLog.message(`executing 'enable, disable' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand All@@ -136,7 +134,6 @@ test('pause, resume', async () => {
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -199,7 +196,6 @@ test('set, remove breakpoint', async () => {
testLog.message(`executing 'set, remove breakpoint' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -246,7 +242,6 @@ test('reload after continue', async () => {
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -285,7 +280,6 @@ test('execution context identifier in Debugger.scriptParsed event', async () =>
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand Down
29 changes: 0 additions & 29 deletions packages/debug-test/PlaygroundAutomation.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -246,9 +246,6 @@ export async function loadPackage(
* Debug settings for the Playground app.
*/
export type DebugSettings = {
// value representing the "Web Debugger" checkbox
webDebugger?: boolean;

// value representing the "Direct Debugging" checkbox
directDebugging?: boolean;

Expand DownExpand Up@@ -292,9 +289,6 @@ export class PlaygroundDebugSettings {
}

private async fetchSettings(settings: DebugSettings) {
const webDebugger = await $$(this.webDebuggerCheckBoxSelector).then(a =>
a[0].isSelected(),
);
const directDebugging = await $$(this.directDebuggingCheckBoxSelector).then(
a => a[0].isSelected(),
);
Expand All@@ -305,18 +299,12 @@ export class PlaygroundDebugSettings {
a[0].getText(),
);

settings.webDebugger = webDebugger;
settings.directDebugging = directDebugging;
settings.debuggerPort = parseInt(debuggerPort, 10);
settings.jsEngine = jsEngine;
}

private async adjustSettings(settings: DebugSettings) {
// Treating the "Web Debugger" check box special as checking it disables the "Debugger Port"
// edit and the "JS Engine" combo.
const webDebuggerCheckBox = (await $$(this.webDebuggerCheckBoxSelector))[0];
let restoreWebDebugger = false;

if (settings.directDebugging !== undefined) {
const directDebuggingCheckBox = (
await $$(this.directDebuggingCheckBoxSelector)
Expand All@@ -329,12 +317,6 @@ export class PlaygroundDebugSettings {
const currentPortText = await debuggerPortEdit.getText();

if (currentPortText !== settings.debuggerPort.toString()) {
if (await webDebuggerCheckBox.isSelected()) {
// enable port number to be changed
await setCheckedState(webDebuggerCheckBox, false);
restoreWebDebugger = true; // restore it later (unless it should be off per settings)
}

await debuggerPortEdit.setValue(settings.debuggerPort);
}
}
Expand DownExpand Up@@ -380,22 +362,11 @@ export class PlaygroundDebugSettings {
`no JS engine specified, leaving at current setting ("${oldJsEngine}")`,
);
}

if (settings.webDebugger !== undefined) {
await setCheckedState(webDebuggerCheckBox, settings.webDebugger);
restoreWebDebugger = false;
}

if (restoreWebDebugger) {
await setCheckedState(webDebuggerCheckBox, true);
}
}

private readonly oldSettings: DebugSettings = {};
private readonly newSettings: DebugSettings;

private readonly webDebuggerCheckBoxSelector =
'./Window/CheckBox[@AutomationId="x_UseWebDebuggerCheckBox"]';
private readonly directDebuggingCheckBoxSelector =
'./Window/CheckBox[@AutomationId="x_UseDirectDebuggerCheckBox"]';
private readonly debuggerPortEditSelector =
Expand Down
2 changes: 0 additions & 2 deletions packages/e2e-test-app/windows/RNTesterApp/App.xaml.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,12 +29,10 @@ public App()
{
#if BUNDLE
JavaScriptBundleFile = "index.windows";
InstanceSettings.UseWebDebugger = false;
InstanceSettings.UseDirectDebugger = false;
InstanceSettings.UseFastRefresh = false;
#else
JavaScriptBundleFile = "app/index";
InstanceSettings.UseWebDebugger = false;
InstanceSettings.UseDirectDebugger = true;
InstanceSettings.UseFastRefresh = true;
#endif
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,11 +23,9 @@ using namespace Windows::ApplicationModel;
App::App() noexcept {
#if BUNDLE
JavaScriptBundleFile(L"index.windows");
InstanceSettings().UseWebDebugger(false);
InstanceSettings().UseFastRefresh(false);
#else
JavaScriptBundleFile(L"index");
InstanceSettings().UseWebDebugger(true);
InstanceSettings().UseFastRefresh(true);
#endif

Expand Down
1 change: 0 additions & 1 deletion packages/playground/CoreApp/App.cpp
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,7 +52,6 @@ int __stdcall wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR /*server*/
app->componentName = L"RNTesterApp";
app->jsBundleFile = LR"(Samples\rntester)";
app->useDeveloperSupport = true;
app->useWebDebugger = false;

#ifdef WITH_MODULES
app->packageProvidersAbiCount = 1;
Expand Down
1 change: 0 additions & 1 deletion packages/playground/CoreApp/app.config.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
// the path to the JS bundle, relative to bundleRootPath. Default value: "index.windows"
"jsBundleFile": "Samples\\rntester",
// "bundleRootPath": "ms-appx:///Bundle/",
"useWebDebugger": false,
// "useFastRefresh": true,
"useDeveloperSupport": true,
// "useDirectDebugger": false,
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -54,7 +54,7 @@ winrt::Windows::UI::Composition::Compositor g_compositor{nullptr};

constexpr auto WindowDataProperty = L"WindowData";

int RunPlayground(int showCmd, bool useWebDebugger);
int RunPlayground(int showCmd);
winrt::Microsoft::ReactNative::IReactPackageProvider CreateStubDeviceInfoPackageProvider() noexcept;

struct WindowData {
Expand DownExpand Up@@ -250,7 +250,7 @@ struct WindowData {
std::thread playgroundThread{([]() {
// For subsequent RN windows do not use the web debugger by default,
// since one instance can be connected to it at a time.
RunPlayground(SW_SHOW, false);
RunPlayground(SW_SHOW);
})};
playgroundThread.detach();
break;
Expand DownExpand Up@@ -497,7 +497,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)

constexpr PCWSTR c_windowClassName = L"MS_REACTNATIVE_PLAYGROUND_COMPOSITION";

int RunPlayground(int showCmd, bool useWebDebugger) {
int RunPlayground(int showCmd) {
constexpr PCWSTR appName = L"React Native Playground (Composition)";

auto windowData = std::make_unique<WindowData>();
Expand DownExpand Up@@ -574,5 +574,5 @@ _Use_decl_annotations_ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE, PSTR
auto playgroundApp{winrt::make<winrt::Playground::implementation::App>()};
#endif

return RunPlayground(showCmd, false);
return RunPlayground(showCmd);
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,7 +42,7 @@ namespace hosting = xaml::Hosting;

constexpr auto WindowDataProperty = L"WindowData";

int RunPlayground(int showCmd, bool useWebDebugger);
int RunPlayground(int showCmd);

HWND GetXamlIslandHwnd(const hosting::DesktopWindowXamlSource &dwxs) {
auto interop = dwxs.as<IDesktopWindowXamlSourceNative>();
Expand All@@ -63,7 +63,6 @@ struct WindowData {
winrt::Microsoft::ReactNative::ReactNativeHost m_host{nullptr};
winrt::Microsoft::ReactNative::ReactInstanceSettings m_instanceSettings{nullptr};

bool m_useWebDebugger{false};
bool m_fastRefreshEnabled{true};
bool m_useDirectDebugger{true};
bool m_breakOnNextLine{false};
Expand DownExpand Up@@ -115,7 +114,6 @@ struct WindowData {

host.InstanceSettings().JavaScriptBundleFile(m_bundleFile);

host.InstanceSettings().UseWebDebugger(m_useWebDebugger);
host.InstanceSettings().UseDirectDebugger(m_useDirectDebugger);
host.InstanceSettings().BundleRootPath(
std::wstring(L"file:").append(workingDir).append(L"\\Bundle\\").c_str());
Expand DownExpand Up@@ -156,7 +154,7 @@ struct WindowData {
std::thread playgroundThread{([]() {
// For subsequent RN windows do not use the web debugger by default,
// since one instance can be connected to it at a time.
RunPlayground(SW_SHOW, false);
RunPlayground(SW_SHOW);
})};
playgroundThread.detach();
break;
Expand DownExpand Up@@ -271,7 +269,6 @@ struct WindowData {
case WM_INITDIALOG: {
auto boolToCheck = [](bool b) { return b ? BST_CHECKED : BST_UNCHECKED; };
auto self = reinterpret_cast<WindowData *>(lparam);
CheckDlgButton(hwnd, IDC_WEBDEBUGGER, boolToCheck(self->m_useWebDebugger));
CheckDlgButton(hwnd, IDC_FASTREFRESH, boolToCheck(self->m_fastRefreshEnabled));
CheckDlgButton(hwnd, IDC_DIRECTDEBUGGER, boolToCheck(self->m_useDirectDebugger));
CheckDlgButton(hwnd, IDC_BREAKONNEXTLINE, boolToCheck(self->m_breakOnNextLine));
Expand All@@ -298,7 +295,6 @@ struct WindowData {
switch (LOWORD(wparam)) {
case IDOK: {
auto self = GetFromWindow(GetParent(hwnd));
self->m_useWebDebugger = IsDlgButtonChecked(hwnd, IDC_WEBDEBUGGER) == BST_CHECKED;
self->m_fastRefreshEnabled = IsDlgButtonChecked(hwnd, IDC_FASTREFRESH) == BST_CHECKED;
self->m_useDirectDebugger = IsDlgButtonChecked(hwnd, IDC_DIRECTDEBUGGER) == BST_CHECKED;
self->m_breakOnNextLine = IsDlgButtonChecked(hwnd, IDC_BREAKONNEXTLINE) == BST_CHECKED;
Expand DownExpand Up@@ -382,7 +378,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)

constexpr PCWSTR c_windowClassName = L"MS_REACTNATIVE_PLAYGROUND_WIN32";

int RunPlayground(int showCmd, bool useWebDebugger) {
int RunPlayground(int showCmd) {
#ifdef USE_WINUI3
constexpr PCWSTR appName = L"React Native Playground (Win32 WinUI3)";
#else
Expand All@@ -401,7 +397,6 @@ int RunPlayground(int showCmd, bool useWebDebugger) {

hosting::DesktopWindowXamlSource desktopXamlSource;
auto windowData = std::make_unique<WindowData>(desktopXamlSource);
windowData->m_useWebDebugger = useWebDebugger;

// We have to use a XAML string here to access the ThemeResource.
// XAML Islands requires us to set the background color to handle theme changes.
Expand DownExpand Up@@ -474,5 +469,5 @@ _Use_decl_annotations_ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE, PSTR
WINRT_VERIFY(classId);
winrt::check_win32(!classId);

return RunPlayground(showCmd, false);
return RunPlayground(showCmd);
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -105,7 +105,6 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSM
CAPTION "Settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL "&Web Debugger",IDC_WEBDEBUGGER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,8,104,10
CONTROL "&Fast Refresh",IDC_FASTREFRESH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,26,104,10
CONTROL "&Direct Debugger",IDC_DIRECTDEBUGGER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,44,104,10
CONTROL "&Break On Next Line",IDC_BREAKONNEXTLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,63,104,10
Expand Down
1 change: 0 additions & 1 deletion packages/playground/windows/playground-win32/resource.h
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
//
#define IDC_PLAYGROUND_WIN32 100
#define IDD_ABOUTBOX 100
#define IDC_WEBDEBUGGER 100
#define IDC_JSBUNDLELIST 100
#define IDM_ABOUT 100
#define IDD_SETTINGSBOX 101
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .spelling
Original file line numberDiff line numberDiff line change
Expand Up@@ -851,7 +851,6 @@ WDIO
WEAKPTR
WEAKREFCOUNT
weakthis
webdebugger
webdriverio
webhosthidden
Wexceptions
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Remove WebDebugging support",
"packageName": "@react-native-windows/cli",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Remove WebDebugging support",
"packageName": "react-native-windows",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
1 change: 0 additions & 1 deletion docs/inspector.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,6 @@ Hence, we expect most tooling available on other platforms to just work on Windo
1. Initialize React Native Host,
- Turn on `DeveloperSupport`
- Turn on `FastRefresh`
- Turn off `WebDebugger`
- Turn on `Direct Debugging`
2. Ensure Dev-Server is running
3. Start the application
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -56,7 +56,6 @@ function optionSanitizer(key: keyof RunWindowsOptions, value: any): any {
case 'singleproc':
case 'emulator':
case 'device':
case 'remoteDebugging':
case 'logging':
case 'packager':
case 'bundle':
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -40,7 +40,6 @@ export interface RunWindowsOptions {
emulator?: boolean;
device?: boolean;
target?: string;
remoteDebugging?: string;
logging?: boolean;
packager?: boolean;
bundle?: boolean;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,7 +25,6 @@ function validateOptionName(
case 'emulator':
case 'device':
case 'target':
case 'remoteDebugging':
case 'logging':
case 'packager':
case 'bundle':
Expand Down
3 changes: 0 additions & 3 deletions packages/@react-native-windows/cli/src/utils/deploy.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -380,9 +380,6 @@ export async function deployToDesktop(
const vsVersion = Version.fromString(buildTools.installationVersion);

const args = [];
if (options.remoteDebugging) {
args.push('--remote-debugging');
}

if (options.directDebugging) {
args.push('--direct-debugging', options.directDebugging.toString());
Expand Down
6 changes: 0 additions & 6 deletions packages/debug-test/DebuggingFeatures.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -65,7 +65,6 @@ test('debug target properties', async () => {
testLog.message(`executing 'debug target properties' on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -111,7 +110,6 @@ test('enable, disable', async () => {
testLog.message(`executing 'enable, disable' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand All@@ -136,7 +134,6 @@ test('pause, resume', async () => {
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -199,7 +196,6 @@ test('set, remove breakpoint', async () => {
testLog.message(`executing 'set, remove breakpoint' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -246,7 +242,6 @@ test('reload after continue', async () => {
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -285,7 +280,6 @@ test('execution context identifier in Debugger.scriptParsed event', async () =>
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand Down
29 changes: 0 additions & 29 deletions packages/debug-test/PlaygroundAutomation.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -246,9 +246,6 @@ export async function loadPackage(
* Debug settings for the Playground app.
*/
export type DebugSettings = {
// value representing the "Web Debugger" checkbox
webDebugger?: boolean;

// value representing the "Direct Debugging" checkbox
directDebugging?: boolean;

Expand DownExpand Up@@ -292,9 +289,6 @@ export class PlaygroundDebugSettings {
}

private async fetchSettings(settings: DebugSettings) {
const webDebugger = await $$(this.webDebuggerCheckBoxSelector).then(a =>
a[0].isSelected(),
);
const directDebugging = await $$(this.directDebuggingCheckBoxSelector).then(
a => a[0].isSelected(),
);
Expand All@@ -305,18 +299,12 @@ export class PlaygroundDebugSettings {
a[0].getText(),
);

settings.webDebugger = webDebugger;
settings.directDebugging = directDebugging;
settings.debuggerPort = parseInt(debuggerPort, 10);
settings.jsEngine = jsEngine;
}

private async adjustSettings(settings: DebugSettings) {
// Treating the "Web Debugger" check box special as checking it disables the "Debugger Port"
// edit and the "JS Engine" combo.
const webDebuggerCheckBox = (await $$(this.webDebuggerCheckBoxSelector))[0];
let restoreWebDebugger = false;

if (settings.directDebugging !== undefined) {
const directDebuggingCheckBox = (
await $$(this.directDebuggingCheckBoxSelector)
Expand All@@ -329,12 +317,6 @@ export class PlaygroundDebugSettings {
const currentPortText = await debuggerPortEdit.getText();

if (currentPortText !== settings.debuggerPort.toString()) {
if (await webDebuggerCheckBox.isSelected()) {
// enable port number to be changed
await setCheckedState(webDebuggerCheckBox, false);
restoreWebDebugger = true; // restore it later (unless it should be off per settings)
}

await debuggerPortEdit.setValue(settings.debuggerPort);
}
}
Expand DownExpand Up@@ -380,22 +362,11 @@ export class PlaygroundDebugSettings {
`no JS engine specified, leaving at current setting ("${oldJsEngine}")`,
);
}

if (settings.webDebugger !== undefined) {
await setCheckedState(webDebuggerCheckBox, settings.webDebugger);
restoreWebDebugger = false;
}

if (restoreWebDebugger) {
await setCheckedState(webDebuggerCheckBox, true);
}
}

private readonly oldSettings: DebugSettings = {};
private readonly newSettings: DebugSettings;

private readonly webDebuggerCheckBoxSelector =
'./Window/CheckBox[@AutomationId="x_UseWebDebuggerCheckBox"]';
private readonly directDebuggingCheckBoxSelector =
'./Window/CheckBox[@AutomationId="x_UseDirectDebuggerCheckBox"]';
private readonly debuggerPortEditSelector =
Expand Down
2 changes: 0 additions & 2 deletions packages/e2e-test-app/windows/RNTesterApp/App.xaml.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,12 +29,10 @@ public App()
{
#if BUNDLE
JavaScriptBundleFile = "index.windows";
InstanceSettings.UseWebDebugger = false;
InstanceSettings.UseDirectDebugger = false;
InstanceSettings.UseFastRefresh = false;
#else
JavaScriptBundleFile = "app/index";
InstanceSettings.UseWebDebugger = false;
InstanceSettings.UseDirectDebugger = true;
InstanceSettings.UseFastRefresh = true;
#endif
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,11 +23,9 @@ using namespace Windows::ApplicationModel;
App::App() noexcept {
#if BUNDLE
JavaScriptBundleFile(L"index.windows");
InstanceSettings().UseWebDebugger(false);
InstanceSettings().UseFastRefresh(false);
#else
JavaScriptBundleFile(L"index");
InstanceSettings().UseWebDebugger(true);
InstanceSettings().UseFastRefresh(true);
#endif

Expand Down
1 change: 0 additions & 1 deletion packages/playground/CoreApp/App.cpp
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,7 +52,6 @@ int __stdcall wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR /*server*/
app->componentName = L"RNTesterApp";
app->jsBundleFile = LR"(Samples\rntester)";
app->useDeveloperSupport = true;
app->useWebDebugger = false;

#ifdef WITH_MODULES
app->packageProvidersAbiCount = 1;
Expand Down
1 change: 0 additions & 1 deletion packages/playground/CoreApp/app.config.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
// the path to the JS bundle, relative to bundleRootPath. Default value: "index.windows"
"jsBundleFile": "Samples\\rntester",
// "bundleRootPath": "ms-appx:///Bundle/",
"useWebDebugger": false,
// "useFastRefresh": true,
"useDeveloperSupport": true,
// "useDirectDebugger": false,
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -54,7 +54,7 @@ winrt::Windows::UI::Composition::Compositor g_compositor{nullptr};

constexpr auto WindowDataProperty = L"WindowData";

int RunPlayground(int showCmd, bool useWebDebugger);
int RunPlayground(int showCmd);
winrt::Microsoft::ReactNative::IReactPackageProvider CreateStubDeviceInfoPackageProvider() noexcept;

struct WindowData {
Expand DownExpand Up@@ -250,7 +250,7 @@ struct WindowData {
std::thread playgroundThread{([]() {
// For subsequent RN windows do not use the web debugger by default,
// since one instance can be connected to it at a time.
RunPlayground(SW_SHOW, false);
RunPlayground(SW_SHOW);
})};
playgroundThread.detach();
break;
Expand DownExpand Up@@ -497,7 +497,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)

constexpr PCWSTR c_windowClassName = L"MS_REACTNATIVE_PLAYGROUND_COMPOSITION";

int RunPlayground(int showCmd, bool useWebDebugger) {
int RunPlayground(int showCmd) {
constexpr PCWSTR appName = L"React Native Playground (Composition)";

auto windowData = std::make_unique<WindowData>();
Expand DownExpand Up@@ -574,5 +574,5 @@ _Use_decl_annotations_ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE, PSTR
auto playgroundApp{winrt::make<winrt::Playground::implementation::App>()};
#endif

return RunPlayground(showCmd, false);
return RunPlayground(showCmd);
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,7 +42,7 @@ namespace hosting = xaml::Hosting;

constexpr auto WindowDataProperty = L"WindowData";

int RunPlayground(int showCmd, bool useWebDebugger);
int RunPlayground(int showCmd);

HWND GetXamlIslandHwnd(const hosting::DesktopWindowXamlSource &dwxs) {
auto interop = dwxs.as<IDesktopWindowXamlSourceNative>();
Expand All@@ -63,7 +63,6 @@ struct WindowData {
winrt::Microsoft::ReactNative::ReactNativeHost m_host{nullptr};
winrt::Microsoft::ReactNative::ReactInstanceSettings m_instanceSettings{nullptr};

bool m_useWebDebugger{false};
bool m_fastRefreshEnabled{true};
bool m_useDirectDebugger{true};
bool m_breakOnNextLine{false};
Expand DownExpand Up@@ -115,7 +114,6 @@ struct WindowData {

host.InstanceSettings().JavaScriptBundleFile(m_bundleFile);

host.InstanceSettings().UseWebDebugger(m_useWebDebugger);
host.InstanceSettings().UseDirectDebugger(m_useDirectDebugger);
host.InstanceSettings().BundleRootPath(
std::wstring(L"file:").append(workingDir).append(L"\\Bundle\\").c_str());
Expand DownExpand Up@@ -156,7 +154,7 @@ struct WindowData {
std::thread playgroundThread{([]() {
// For subsequent RN windows do not use the web debugger by default,
// since one instance can be connected to it at a time.
RunPlayground(SW_SHOW, false);
RunPlayground(SW_SHOW);
})};
playgroundThread.detach();
break;
Expand DownExpand Up@@ -271,7 +269,6 @@ struct WindowData {
case WM_INITDIALOG: {
auto boolToCheck = [](bool b) { return b ? BST_CHECKED : BST_UNCHECKED; };
auto self = reinterpret_cast<WindowData *>(lparam);
CheckDlgButton(hwnd, IDC_WEBDEBUGGER, boolToCheck(self->m_useWebDebugger));
CheckDlgButton(hwnd, IDC_FASTREFRESH, boolToCheck(self->m_fastRefreshEnabled));
CheckDlgButton(hwnd, IDC_DIRECTDEBUGGER, boolToCheck(self->m_useDirectDebugger));
CheckDlgButton(hwnd, IDC_BREAKONNEXTLINE, boolToCheck(self->m_breakOnNextLine));
Expand All@@ -298,7 +295,6 @@ struct WindowData {
switch (LOWORD(wparam)) {
case IDOK: {
auto self = GetFromWindow(GetParent(hwnd));
self->m_useWebDebugger = IsDlgButtonChecked(hwnd, IDC_WEBDEBUGGER) == BST_CHECKED;
self->m_fastRefreshEnabled = IsDlgButtonChecked(hwnd, IDC_FASTREFRESH) == BST_CHECKED;
self->m_useDirectDebugger = IsDlgButtonChecked(hwnd, IDC_DIRECTDEBUGGER) == BST_CHECKED;
self->m_breakOnNextLine = IsDlgButtonChecked(hwnd, IDC_BREAKONNEXTLINE) == BST_CHECKED;
Expand DownExpand Up@@ -382,7 +378,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)

constexpr PCWSTR c_windowClassName = L"MS_REACTNATIVE_PLAYGROUND_WIN32";

int RunPlayground(int showCmd, bool useWebDebugger) {
int RunPlayground(int showCmd) {
#ifdef USE_WINUI3
constexpr PCWSTR appName = L"React Native Playground (Win32 WinUI3)";
#else
Expand All@@ -401,7 +397,6 @@ int RunPlayground(int showCmd, bool useWebDebugger) {

hosting::DesktopWindowXamlSource desktopXamlSource;
auto windowData = std::make_unique<WindowData>(desktopXamlSource);
windowData->m_useWebDebugger = useWebDebugger;

// We have to use a XAML string here to access the ThemeResource.
// XAML Islands requires us to set the background color to handle theme changes.
Expand DownExpand Up@@ -474,5 +469,5 @@ _Use_decl_annotations_ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE, PSTR
WINRT_VERIFY(classId);
winrt::check_win32(!classId);

return RunPlayground(showCmd, false);
return RunPlayground(showCmd);
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -105,7 +105,6 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSM
CAPTION "Settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL "&Web Debugger",IDC_WEBDEBUGGER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,8,104,10
CONTROL "&Fast Refresh",IDC_FASTREFRESH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,26,104,10
CONTROL "&Direct Debugger",IDC_DIRECTDEBUGGER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,44,104,10
CONTROL "&Break On Next Line",IDC_BREAKONNEXTLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,63,104,10
Expand Down
1 change: 0 additions & 1 deletion packages/playground/windows/playground-win32/resource.h
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
//
#define IDC_PLAYGROUND_WIN32 100
#define IDD_ABOUTBOX 100
#define IDC_WEBDEBUGGER 100
#define IDC_JSBUNDLELIST 100
#define IDM_ABOUT 100
#define IDD_SETTINGSBOX 101
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .spelling
Original file line numberDiff line numberDiff line change
Expand Up@@ -851,7 +851,6 @@ WDIO
WEAKPTR
WEAKREFCOUNT
weakthis
webdebugger
webdriverio
webhosthidden
Wexceptions
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Remove WebDebugging support",
"packageName": "@react-native-windows/cli",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Remove WebDebugging support",
"packageName": "react-native-windows",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
1 change: 0 additions & 1 deletion docs/inspector.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,6 @@ Hence, we expect most tooling available on other platforms to just work on Windo
1. Initialize React Native Host,
- Turn on `DeveloperSupport`
- Turn on `FastRefresh`
- Turn off `WebDebugger`
- Turn on `Direct Debugging`
2. Ensure Dev-Server is running
3. Start the application
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -56,7 +56,6 @@ function optionSanitizer(key: keyof RunWindowsOptions, value: any): any {
case 'singleproc':
case 'emulator':
case 'device':
case 'remoteDebugging':
case 'logging':
case 'packager':
case 'bundle':
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -40,7 +40,6 @@ export interface RunWindowsOptions {
emulator?: boolean;
device?: boolean;
target?: string;
remoteDebugging?: string;
logging?: boolean;
packager?: boolean;
bundle?: boolean;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,7 +25,6 @@ function validateOptionName(
case 'emulator':
case 'device':
case 'target':
case 'remoteDebugging':
case 'logging':
case 'packager':
case 'bundle':
Expand Down
3 changes: 0 additions & 3 deletions packages/@react-native-windows/cli/src/utils/deploy.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -380,9 +380,6 @@ export async function deployToDesktop(
const vsVersion = Version.fromString(buildTools.installationVersion);

const args = [];
if (options.remoteDebugging) {
args.push('--remote-debugging');
}

if (options.directDebugging) {
args.push('--direct-debugging', options.directDebugging.toString());
Expand Down
6 changes: 0 additions & 6 deletions packages/debug-test/DebuggingFeatures.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -65,7 +65,6 @@ test('debug target properties', async () => {
testLog.message(`executing 'debug target properties' on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -111,7 +110,6 @@ test('enable, disable', async () => {
testLog.message(`executing 'enable, disable' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand All@@ -136,7 +134,6 @@ test('pause, resume', async () => {
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -199,7 +196,6 @@ test('set, remove breakpoint', async () => {
testLog.message(`executing 'set, remove breakpoint' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -246,7 +242,6 @@ test('reload after continue', async () => {
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -285,7 +280,6 @@ test('execution context identifier in Debugger.scriptParsed event', async () =>
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand Down
29 changes: 0 additions & 29 deletions packages/debug-test/PlaygroundAutomation.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -246,9 +246,6 @@ export async function loadPackage(
* Debug settings for the Playground app.
*/
export type DebugSettings = {
// value representing the "Web Debugger" checkbox
webDebugger?: boolean;

// value representing the "Direct Debugging" checkbox
directDebugging?: boolean;

Expand DownExpand Up@@ -292,9 +289,6 @@ export class PlaygroundDebugSettings {
}

private async fetchSettings(settings: DebugSettings) {
const webDebugger = await $$(this.webDebuggerCheckBoxSelector).then(a =>
a[0].isSelected(),
);
const directDebugging = await $$(this.directDebuggingCheckBoxSelector).then(
a => a[0].isSelected(),
);
Expand All@@ -305,18 +299,12 @@ export class PlaygroundDebugSettings {
a[0].getText(),
);

settings.webDebugger = webDebugger;
settings.directDebugging = directDebugging;
settings.debuggerPort = parseInt(debuggerPort, 10);
settings.jsEngine = jsEngine;
}

private async adjustSettings(settings: DebugSettings) {
// Treating the "Web Debugger" check box special as checking it disables the "Debugger Port"
// edit and the "JS Engine" combo.
const webDebuggerCheckBox = (await $$(this.webDebuggerCheckBoxSelector))[0];
let restoreWebDebugger = false;

if (settings.directDebugging !== undefined) {
const directDebuggingCheckBox = (
await $$(this.directDebuggingCheckBoxSelector)
Expand All@@ -329,12 +317,6 @@ export class PlaygroundDebugSettings {
const currentPortText = await debuggerPortEdit.getText();

if (currentPortText !== settings.debuggerPort.toString()) {
if (await webDebuggerCheckBox.isSelected()) {
// enable port number to be changed
await setCheckedState(webDebuggerCheckBox, false);
restoreWebDebugger = true; // restore it later (unless it should be off per settings)
}

await debuggerPortEdit.setValue(settings.debuggerPort);
}
}
Expand DownExpand Up@@ -380,22 +362,11 @@ export class PlaygroundDebugSettings {
`no JS engine specified, leaving at current setting ("${oldJsEngine}")`,
);
}

if (settings.webDebugger !== undefined) {
await setCheckedState(webDebuggerCheckBox, settings.webDebugger);
restoreWebDebugger = false;
}

if (restoreWebDebugger) {
await setCheckedState(webDebuggerCheckBox, true);
}
}

private readonly oldSettings: DebugSettings = {};
private readonly newSettings: DebugSettings;

private readonly webDebuggerCheckBoxSelector =
'./Window/CheckBox[@AutomationId="x_UseWebDebuggerCheckBox"]';
private readonly directDebuggingCheckBoxSelector =
'./Window/CheckBox[@AutomationId="x_UseDirectDebuggerCheckBox"]';
private readonly debuggerPortEditSelector =
Expand Down
2 changes: 0 additions & 2 deletions packages/e2e-test-app/windows/RNTesterApp/App.xaml.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,12 +29,10 @@ public App()
{
#if BUNDLE
JavaScriptBundleFile = "index.windows";
InstanceSettings.UseWebDebugger = false;
InstanceSettings.UseDirectDebugger = false;
InstanceSettings.UseFastRefresh = false;
#else
JavaScriptBundleFile = "app/index";
InstanceSettings.UseWebDebugger = false;
InstanceSettings.UseDirectDebugger = true;
InstanceSettings.UseFastRefresh = true;
#endif
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,11 +23,9 @@ using namespace Windows::ApplicationModel;
App::App() noexcept {
#if BUNDLE
JavaScriptBundleFile(L"index.windows");
InstanceSettings().UseWebDebugger(false);
InstanceSettings().UseFastRefresh(false);
#else
JavaScriptBundleFile(L"index");
InstanceSettings().UseWebDebugger(true);
InstanceSettings().UseFastRefresh(true);
#endif

Expand Down
1 change: 0 additions & 1 deletion packages/playground/CoreApp/App.cpp
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,7 +52,6 @@ int __stdcall wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR /*server*/
app->componentName = L"RNTesterApp";
app->jsBundleFile = LR"(Samples\rntester)";
app->useDeveloperSupport = true;
app->useWebDebugger = false;

#ifdef WITH_MODULES
app->packageProvidersAbiCount = 1;
Expand Down
1 change: 0 additions & 1 deletion packages/playground/CoreApp/app.config.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
// the path to the JS bundle, relative to bundleRootPath. Default value: "index.windows"
"jsBundleFile": "Samples\\rntester",
// "bundleRootPath": "ms-appx:///Bundle/",
"useWebDebugger": false,
// "useFastRefresh": true,
"useDeveloperSupport": true,
// "useDirectDebugger": false,
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -54,7 +54,7 @@ winrt::Windows::UI::Composition::Compositor g_compositor{nullptr};

constexpr auto WindowDataProperty = L"WindowData";

int RunPlayground(int showCmd, bool useWebDebugger);
int RunPlayground(int showCmd);
winrt::Microsoft::ReactNative::IReactPackageProvider CreateStubDeviceInfoPackageProvider() noexcept;

struct WindowData {
Expand DownExpand Up@@ -250,7 +250,7 @@ struct WindowData {
std::thread playgroundThread{([]() {
// For subsequent RN windows do not use the web debugger by default,
// since one instance can be connected to it at a time.
RunPlayground(SW_SHOW, false);
RunPlayground(SW_SHOW);
})};
playgroundThread.detach();
break;
Expand DownExpand Up@@ -497,7 +497,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)

constexpr PCWSTR c_windowClassName = L"MS_REACTNATIVE_PLAYGROUND_COMPOSITION";

int RunPlayground(int showCmd, bool useWebDebugger) {
int RunPlayground(int showCmd) {
constexpr PCWSTR appName = L"React Native Playground (Composition)";

auto windowData = std::make_unique<WindowData>();
Expand DownExpand Up@@ -574,5 +574,5 @@ _Use_decl_annotations_ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE, PSTR
auto playgroundApp{winrt::make<winrt::Playground::implementation::App>()};
#endif

return RunPlayground(showCmd, false);
return RunPlayground(showCmd);
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,7 +42,7 @@ namespace hosting = xaml::Hosting;

constexpr auto WindowDataProperty = L"WindowData";

int RunPlayground(int showCmd, bool useWebDebugger);
int RunPlayground(int showCmd);

HWND GetXamlIslandHwnd(const hosting::DesktopWindowXamlSource &dwxs) {
auto interop = dwxs.as<IDesktopWindowXamlSourceNative>();
Expand All@@ -63,7 +63,6 @@ struct WindowData {
winrt::Microsoft::ReactNative::ReactNativeHost m_host{nullptr};
winrt::Microsoft::ReactNative::ReactInstanceSettings m_instanceSettings{nullptr};

bool m_useWebDebugger{false};
bool m_fastRefreshEnabled{true};
bool m_useDirectDebugger{true};
bool m_breakOnNextLine{false};
Expand DownExpand Up@@ -115,7 +114,6 @@ struct WindowData {

host.InstanceSettings().JavaScriptBundleFile(m_bundleFile);

host.InstanceSettings().UseWebDebugger(m_useWebDebugger);
host.InstanceSettings().UseDirectDebugger(m_useDirectDebugger);
host.InstanceSettings().BundleRootPath(
std::wstring(L"file:").append(workingDir).append(L"\\Bundle\\").c_str());
Expand DownExpand Up@@ -156,7 +154,7 @@ struct WindowData {
std::thread playgroundThread{([]() {
// For subsequent RN windows do not use the web debugger by default,
// since one instance can be connected to it at a time.
RunPlayground(SW_SHOW, false);
RunPlayground(SW_SHOW);
})};
playgroundThread.detach();
break;
Expand DownExpand Up@@ -271,7 +269,6 @@ struct WindowData {
case WM_INITDIALOG: {
auto boolToCheck = [](bool b) { return b ? BST_CHECKED : BST_UNCHECKED; };
auto self = reinterpret_cast<WindowData *>(lparam);
CheckDlgButton(hwnd, IDC_WEBDEBUGGER, boolToCheck(self->m_useWebDebugger));
CheckDlgButton(hwnd, IDC_FASTREFRESH, boolToCheck(self->m_fastRefreshEnabled));
CheckDlgButton(hwnd, IDC_DIRECTDEBUGGER, boolToCheck(self->m_useDirectDebugger));
CheckDlgButton(hwnd, IDC_BREAKONNEXTLINE, boolToCheck(self->m_breakOnNextLine));
Expand All@@ -298,7 +295,6 @@ struct WindowData {
switch (LOWORD(wparam)) {
case IDOK: {
auto self = GetFromWindow(GetParent(hwnd));
self->m_useWebDebugger = IsDlgButtonChecked(hwnd, IDC_WEBDEBUGGER) == BST_CHECKED;
self->m_fastRefreshEnabled = IsDlgButtonChecked(hwnd, IDC_FASTREFRESH) == BST_CHECKED;
self->m_useDirectDebugger = IsDlgButtonChecked(hwnd, IDC_DIRECTDEBUGGER) == BST_CHECKED;
self->m_breakOnNextLine = IsDlgButtonChecked(hwnd, IDC_BREAKONNEXTLINE) == BST_CHECKED;
Expand DownExpand Up@@ -382,7 +378,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)

constexpr PCWSTR c_windowClassName = L"MS_REACTNATIVE_PLAYGROUND_WIN32";

int RunPlayground(int showCmd, bool useWebDebugger) {
int RunPlayground(int showCmd) {
#ifdef USE_WINUI3
constexpr PCWSTR appName = L"React Native Playground (Win32 WinUI3)";
#else
Expand All@@ -401,7 +397,6 @@ int RunPlayground(int showCmd, bool useWebDebugger) {

hosting::DesktopWindowXamlSource desktopXamlSource;
auto windowData = std::make_unique<WindowData>(desktopXamlSource);
windowData->m_useWebDebugger = useWebDebugger;

// We have to use a XAML string here to access the ThemeResource.
// XAML Islands requires us to set the background color to handle theme changes.
Expand DownExpand Up@@ -474,5 +469,5 @@ _Use_decl_annotations_ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE, PSTR
WINRT_VERIFY(classId);
winrt::check_win32(!classId);

return RunPlayground(showCmd, false);
return RunPlayground(showCmd);
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -105,7 +105,6 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSM
CAPTION "Settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL "&Web Debugger",IDC_WEBDEBUGGER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,8,104,10
CONTROL "&Fast Refresh",IDC_FASTREFRESH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,26,104,10
CONTROL "&Direct Debugger",IDC_DIRECTDEBUGGER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,44,104,10
CONTROL "&Break On Next Line",IDC_BREAKONNEXTLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,63,104,10
Expand Down
1 change: 0 additions & 1 deletion packages/playground/windows/playground-win32/resource.h
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
//
#define IDC_PLAYGROUND_WIN32 100
#define IDD_ABOUTBOX 100
#define IDC_WEBDEBUGGER 100
#define IDC_JSBUNDLELIST 100
#define IDM_ABOUT 100
#define IDD_SETTINGSBOX 101
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .spelling
Original file line numberDiff line numberDiff line change
Expand Up@@ -851,7 +851,6 @@ WDIO
WEAKPTR
WEAKREFCOUNT
weakthis
webdebugger
webdriverio
webhosthidden
Wexceptions
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Remove WebDebugging support",
"packageName": "@react-native-windows/cli",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Remove WebDebugging support",
"packageName": "react-native-windows",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
1 change: 0 additions & 1 deletion docs/inspector.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,6 @@ Hence, we expect most tooling available on other platforms to just work on Windo
1. Initialize React Native Host,
- Turn on `DeveloperSupport`
- Turn on `FastRefresh`
- Turn off `WebDebugger`
- Turn on `Direct Debugging`
2. Ensure Dev-Server is running
3. Start the application
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -56,7 +56,6 @@ function optionSanitizer(key: keyof RunWindowsOptions, value: any): any {
case 'singleproc':
case 'emulator':
case 'device':
case 'remoteDebugging':
case 'logging':
case 'packager':
case 'bundle':
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -40,7 +40,6 @@ export interface RunWindowsOptions {
emulator?: boolean;
device?: boolean;
target?: string;
remoteDebugging?: string;
logging?: boolean;
packager?: boolean;
bundle?: boolean;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,7 +25,6 @@ function validateOptionName(
case 'emulator':
case 'device':
case 'target':
case 'remoteDebugging':
case 'logging':
case 'packager':
case 'bundle':
Expand Down
3 changes: 0 additions & 3 deletions packages/@react-native-windows/cli/src/utils/deploy.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -380,9 +380,6 @@ export async function deployToDesktop(
const vsVersion = Version.fromString(buildTools.installationVersion);

const args = [];
if (options.remoteDebugging) {
args.push('--remote-debugging');
}

if (options.directDebugging) {
args.push('--direct-debugging', options.directDebugging.toString());
Expand Down
6 changes: 0 additions & 6 deletions packages/debug-test/DebuggingFeatures.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -65,7 +65,6 @@ test('debug target properties', async () => {
testLog.message(`executing 'debug target properties' on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -111,7 +110,6 @@ test('enable, disable', async () => {
testLog.message(`executing 'enable, disable' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand All@@ -136,7 +134,6 @@ test('pause, resume', async () => {
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -199,7 +196,6 @@ test('set, remove breakpoint', async () => {
testLog.message(`executing 'set, remove breakpoint' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -246,7 +242,6 @@ test('reload after continue', async () => {
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -285,7 +280,6 @@ test('execution context identifier in Debugger.scriptParsed event', async () =>
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand Down
29 changes: 0 additions & 29 deletions packages/debug-test/PlaygroundAutomation.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -246,9 +246,6 @@ export async function loadPackage(
* Debug settings for the Playground app.
*/
export type DebugSettings = {
// value representing the "Web Debugger" checkbox
webDebugger?: boolean;

// value representing the "Direct Debugging" checkbox
directDebugging?: boolean;

Expand DownExpand Up@@ -292,9 +289,6 @@ export class PlaygroundDebugSettings {
}

private async fetchSettings(settings: DebugSettings) {
const webDebugger = await $$(this.webDebuggerCheckBoxSelector).then(a =>
a[0].isSelected(),
);
const directDebugging = await $$(this.directDebuggingCheckBoxSelector).then(
a => a[0].isSelected(),
);
Expand All@@ -305,18 +299,12 @@ export class PlaygroundDebugSettings {
a[0].getText(),
);

settings.webDebugger = webDebugger;
settings.directDebugging = directDebugging;
settings.debuggerPort = parseInt(debuggerPort, 10);
settings.jsEngine = jsEngine;
}

private async adjustSettings(settings: DebugSettings) {
// Treating the "Web Debugger" check box special as checking it disables the "Debugger Port"
// edit and the "JS Engine" combo.
const webDebuggerCheckBox = (await $$(this.webDebuggerCheckBoxSelector))[0];
let restoreWebDebugger = false;

if (settings.directDebugging !== undefined) {
const directDebuggingCheckBox = (
await $$(this.directDebuggingCheckBoxSelector)
Expand All@@ -329,12 +317,6 @@ export class PlaygroundDebugSettings {
const currentPortText = await debuggerPortEdit.getText();

if (currentPortText !== settings.debuggerPort.toString()) {
if (await webDebuggerCheckBox.isSelected()) {
// enable port number to be changed
await setCheckedState(webDebuggerCheckBox, false);
restoreWebDebugger = true; // restore it later (unless it should be off per settings)
}

await debuggerPortEdit.setValue(settings.debuggerPort);
}
}
Expand DownExpand Up@@ -380,22 +362,11 @@ export class PlaygroundDebugSettings {
`no JS engine specified, leaving at current setting ("${oldJsEngine}")`,
);
}

if (settings.webDebugger !== undefined) {
await setCheckedState(webDebuggerCheckBox, settings.webDebugger);
restoreWebDebugger = false;
}

if (restoreWebDebugger) {
await setCheckedState(webDebuggerCheckBox, true);
}
}

private readonly oldSettings: DebugSettings = {};
private readonly newSettings: DebugSettings;

private readonly webDebuggerCheckBoxSelector =
'./Window/CheckBox[@AutomationId="x_UseWebDebuggerCheckBox"]';
private readonly directDebuggingCheckBoxSelector =
'./Window/CheckBox[@AutomationId="x_UseDirectDebuggerCheckBox"]';
private readonly debuggerPortEditSelector =
Expand Down
2 changes: 0 additions & 2 deletions packages/e2e-test-app/windows/RNTesterApp/App.xaml.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,12 +29,10 @@ public App()
{
#if BUNDLE
JavaScriptBundleFile = "index.windows";
InstanceSettings.UseWebDebugger = false;
InstanceSettings.UseDirectDebugger = false;
InstanceSettings.UseFastRefresh = false;
#else
JavaScriptBundleFile = "app/index";
InstanceSettings.UseWebDebugger = false;
InstanceSettings.UseDirectDebugger = true;
InstanceSettings.UseFastRefresh = true;
#endif
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,11 +23,9 @@ using namespace Windows::ApplicationModel;
App::App() noexcept {
#if BUNDLE
JavaScriptBundleFile(L"index.windows");
InstanceSettings().UseWebDebugger(false);
InstanceSettings().UseFastRefresh(false);
#else
JavaScriptBundleFile(L"index");
InstanceSettings().UseWebDebugger(true);
InstanceSettings().UseFastRefresh(true);
#endif

Expand Down
1 change: 0 additions & 1 deletion packages/playground/CoreApp/App.cpp
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,7 +52,6 @@ int __stdcall wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR /*server*/
app->componentName = L"RNTesterApp";
app->jsBundleFile = LR"(Samples\rntester)";
app->useDeveloperSupport = true;
app->useWebDebugger = false;

#ifdef WITH_MODULES
app->packageProvidersAbiCount = 1;
Expand Down
1 change: 0 additions & 1 deletion packages/playground/CoreApp/app.config.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
// the path to the JS bundle, relative to bundleRootPath. Default value: "index.windows"
"jsBundleFile": "Samples\\rntester",
// "bundleRootPath": "ms-appx:///Bundle/",
"useWebDebugger": false,
// "useFastRefresh": true,
"useDeveloperSupport": true,
// "useDirectDebugger": false,
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -54,7 +54,7 @@ winrt::Windows::UI::Composition::Compositor g_compositor{nullptr};

constexpr auto WindowDataProperty = L"WindowData";

int RunPlayground(int showCmd, bool useWebDebugger);
int RunPlayground(int showCmd);
winrt::Microsoft::ReactNative::IReactPackageProvider CreateStubDeviceInfoPackageProvider() noexcept;

struct WindowData {
Expand DownExpand Up@@ -250,7 +250,7 @@ struct WindowData {
std::thread playgroundThread{([]() {
// For subsequent RN windows do not use the web debugger by default,
// since one instance can be connected to it at a time.
RunPlayground(SW_SHOW, false);
RunPlayground(SW_SHOW);
})};
playgroundThread.detach();
break;
Expand DownExpand Up@@ -497,7 +497,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)

constexpr PCWSTR c_windowClassName = L"MS_REACTNATIVE_PLAYGROUND_COMPOSITION";

int RunPlayground(int showCmd, bool useWebDebugger) {
int RunPlayground(int showCmd) {
constexpr PCWSTR appName = L"React Native Playground (Composition)";

auto windowData = std::make_unique<WindowData>();
Expand DownExpand Up@@ -574,5 +574,5 @@ _Use_decl_annotations_ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE, PSTR
auto playgroundApp{winrt::make<winrt::Playground::implementation::App>()};
#endif

return RunPlayground(showCmd, false);
return RunPlayground(showCmd);
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,7 +42,7 @@ namespace hosting = xaml::Hosting;

constexpr auto WindowDataProperty = L"WindowData";

int RunPlayground(int showCmd, bool useWebDebugger);
int RunPlayground(int showCmd);

HWND GetXamlIslandHwnd(const hosting::DesktopWindowXamlSource &dwxs) {
auto interop = dwxs.as<IDesktopWindowXamlSourceNative>();
Expand All@@ -63,7 +63,6 @@ struct WindowData {
winrt::Microsoft::ReactNative::ReactNativeHost m_host{nullptr};
winrt::Microsoft::ReactNative::ReactInstanceSettings m_instanceSettings{nullptr};

bool m_useWebDebugger{false};
bool m_fastRefreshEnabled{true};
bool m_useDirectDebugger{true};
bool m_breakOnNextLine{false};
Expand DownExpand Up@@ -115,7 +114,6 @@ struct WindowData {

host.InstanceSettings().JavaScriptBundleFile(m_bundleFile);

host.InstanceSettings().UseWebDebugger(m_useWebDebugger);
host.InstanceSettings().UseDirectDebugger(m_useDirectDebugger);
host.InstanceSettings().BundleRootPath(
std::wstring(L"file:").append(workingDir).append(L"\\Bundle\\").c_str());
Expand DownExpand Up@@ -156,7 +154,7 @@ struct WindowData {
std::thread playgroundThread{([]() {
// For subsequent RN windows do not use the web debugger by default,
// since one instance can be connected to it at a time.
RunPlayground(SW_SHOW, false);
RunPlayground(SW_SHOW);
})};
playgroundThread.detach();
break;
Expand DownExpand Up@@ -271,7 +269,6 @@ struct WindowData {
case WM_INITDIALOG: {
auto boolToCheck = [](bool b) { return b ? BST_CHECKED : BST_UNCHECKED; };
auto self = reinterpret_cast<WindowData *>(lparam);
CheckDlgButton(hwnd, IDC_WEBDEBUGGER, boolToCheck(self->m_useWebDebugger));
CheckDlgButton(hwnd, IDC_FASTREFRESH, boolToCheck(self->m_fastRefreshEnabled));
CheckDlgButton(hwnd, IDC_DIRECTDEBUGGER, boolToCheck(self->m_useDirectDebugger));
CheckDlgButton(hwnd, IDC_BREAKONNEXTLINE, boolToCheck(self->m_breakOnNextLine));
Expand All@@ -298,7 +295,6 @@ struct WindowData {
switch (LOWORD(wparam)) {
case IDOK: {
auto self = GetFromWindow(GetParent(hwnd));
self->m_useWebDebugger = IsDlgButtonChecked(hwnd, IDC_WEBDEBUGGER) == BST_CHECKED;
self->m_fastRefreshEnabled = IsDlgButtonChecked(hwnd, IDC_FASTREFRESH) == BST_CHECKED;
self->m_useDirectDebugger = IsDlgButtonChecked(hwnd, IDC_DIRECTDEBUGGER) == BST_CHECKED;
self->m_breakOnNextLine = IsDlgButtonChecked(hwnd, IDC_BREAKONNEXTLINE) == BST_CHECKED;
Expand DownExpand Up@@ -382,7 +378,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)

constexpr PCWSTR c_windowClassName = L"MS_REACTNATIVE_PLAYGROUND_WIN32";

int RunPlayground(int showCmd, bool useWebDebugger) {
int RunPlayground(int showCmd) {
#ifdef USE_WINUI3
constexpr PCWSTR appName = L"React Native Playground (Win32 WinUI3)";
#else
Expand All@@ -401,7 +397,6 @@ int RunPlayground(int showCmd, bool useWebDebugger) {

hosting::DesktopWindowXamlSource desktopXamlSource;
auto windowData = std::make_unique<WindowData>(desktopXamlSource);
windowData->m_useWebDebugger = useWebDebugger;

// We have to use a XAML string here to access the ThemeResource.
// XAML Islands requires us to set the background color to handle theme changes.
Expand DownExpand Up@@ -474,5 +469,5 @@ _Use_decl_annotations_ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE, PSTR
WINRT_VERIFY(classId);
winrt::check_win32(!classId);

return RunPlayground(showCmd, false);
return RunPlayground(showCmd);
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -105,7 +105,6 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSM
CAPTION "Settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL "&Web Debugger",IDC_WEBDEBUGGER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,8,104,10
CONTROL "&Fast Refresh",IDC_FASTREFRESH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,26,104,10
CONTROL "&Direct Debugger",IDC_DIRECTDEBUGGER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,44,104,10
CONTROL "&Break On Next Line",IDC_BREAKONNEXTLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,63,104,10
Expand Down
1 change: 0 additions & 1 deletion packages/playground/windows/playground-win32/resource.h
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
//
#define IDC_PLAYGROUND_WIN32 100
#define IDD_ABOUTBOX 100
#define IDC_WEBDEBUGGER 100
#define IDC_JSBUNDLELIST 100
#define IDM_ABOUT 100
#define IDD_SETTINGSBOX 101
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .spelling
Original file line numberDiff line numberDiff line change
Expand Up@@ -851,7 +851,6 @@ WDIO
WEAKPTR
WEAKREFCOUNT
weakthis
webdebugger
webdriverio
webhosthidden
Wexceptions
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Remove WebDebugging support",
"packageName": "@react-native-windows/cli",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Remove WebDebugging support",
"packageName": "react-native-windows",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
1 change: 0 additions & 1 deletion docs/inspector.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,6 @@ Hence, we expect most tooling available on other platforms to just work on Windo
1. Initialize React Native Host,
- Turn on `DeveloperSupport`
- Turn on `FastRefresh`
- Turn off `WebDebugger`
- Turn on `Direct Debugging`
2. Ensure Dev-Server is running
3. Start the application
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -56,7 +56,6 @@ function optionSanitizer(key: keyof RunWindowsOptions, value: any): any {
case 'singleproc':
case 'emulator':
case 'device':
case 'remoteDebugging':
case 'logging':
case 'packager':
case 'bundle':
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -40,7 +40,6 @@ export interface RunWindowsOptions {
emulator?: boolean;
device?: boolean;
target?: string;
remoteDebugging?: string;
logging?: boolean;
packager?: boolean;
bundle?: boolean;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,7 +25,6 @@ function validateOptionName(
case 'emulator':
case 'device':
case 'target':
case 'remoteDebugging':
case 'logging':
case 'packager':
case 'bundle':
Expand Down
3 changes: 0 additions & 3 deletions packages/@react-native-windows/cli/src/utils/deploy.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -380,9 +380,6 @@ export async function deployToDesktop(
const vsVersion = Version.fromString(buildTools.installationVersion);

const args = [];
if (options.remoteDebugging) {
args.push('--remote-debugging');
}

if (options.directDebugging) {
args.push('--direct-debugging', options.directDebugging.toString());
Expand Down
6 changes: 0 additions & 6 deletions packages/debug-test/DebuggingFeatures.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -65,7 +65,6 @@ test('debug target properties', async () => {
testLog.message(`executing 'debug target properties' on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -111,7 +110,6 @@ test('enable, disable', async () => {
testLog.message(`executing 'enable, disable' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand All@@ -136,7 +134,6 @@ test('pause, resume', async () => {
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -199,7 +196,6 @@ test('set, remove breakpoint', async () => {
testLog.message(`executing 'set, remove breakpoint' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -246,7 +242,6 @@ test('reload after continue', async () => {
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand DownExpand Up@@ -285,7 +280,6 @@ test('execution context identifier in Debugger.scriptParsed event', async () =>
testLog.message(`executing 'pause, resume' test on PID ${pid}`);

const settings = await PlaygroundDebugSettings.set({
webDebugger: false,
directDebugging: true,
jsEngine: 'Hermes',
});
Expand Down
29 changes: 0 additions & 29 deletions packages/debug-test/PlaygroundAutomation.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -246,9 +246,6 @@ export async function loadPackage(
* Debug settings for the Playground app.
*/
export type DebugSettings = {
// value representing the "Web Debugger" checkbox
webDebugger?: boolean;

// value representing the "Direct Debugging" checkbox
directDebugging?: boolean;

Expand DownExpand Up@@ -292,9 +289,6 @@ export class PlaygroundDebugSettings {
}

private async fetchSettings(settings: DebugSettings) {
const webDebugger = await $$(this.webDebuggerCheckBoxSelector).then(a =>
a[0].isSelected(),
);
const directDebugging = await $$(this.directDebuggingCheckBoxSelector).then(
a => a[0].isSelected(),
);
Expand All@@ -305,18 +299,12 @@ export class PlaygroundDebugSettings {
a[0].getText(),
);

settings.webDebugger = webDebugger;
settings.directDebugging = directDebugging;
settings.debuggerPort = parseInt(debuggerPort, 10);
settings.jsEngine = jsEngine;
}

private async adjustSettings(settings: DebugSettings) {
// Treating the "Web Debugger" check box special as checking it disables the "Debugger Port"
// edit and the "JS Engine" combo.
const webDebuggerCheckBox = (await $$(this.webDebuggerCheckBoxSelector))[0];
let restoreWebDebugger = false;

if (settings.directDebugging !== undefined) {
const directDebuggingCheckBox = (
await $$(this.directDebuggingCheckBoxSelector)
Expand All@@ -329,12 +317,6 @@ export class PlaygroundDebugSettings {
const currentPortText = await debuggerPortEdit.getText();

if (currentPortText !== settings.debuggerPort.toString()) {
if (await webDebuggerCheckBox.isSelected()) {
// enable port number to be changed
await setCheckedState(webDebuggerCheckBox, false);
restoreWebDebugger = true; // restore it later (unless it should be off per settings)
}

await debuggerPortEdit.setValue(settings.debuggerPort);
}
}
Expand DownExpand Up@@ -380,22 +362,11 @@ export class PlaygroundDebugSettings {
`no JS engine specified, leaving at current setting ("${oldJsEngine}")`,
);
}

if (settings.webDebugger !== undefined) {
await setCheckedState(webDebuggerCheckBox, settings.webDebugger);
restoreWebDebugger = false;
}

if (restoreWebDebugger) {
await setCheckedState(webDebuggerCheckBox, true);
}
}

private readonly oldSettings: DebugSettings = {};
private readonly newSettings: DebugSettings;

private readonly webDebuggerCheckBoxSelector =
'./Window/CheckBox[@AutomationId="x_UseWebDebuggerCheckBox"]';
private readonly directDebuggingCheckBoxSelector =
'./Window/CheckBox[@AutomationId="x_UseDirectDebuggerCheckBox"]';
private readonly debuggerPortEditSelector =
Expand Down
2 changes: 0 additions & 2 deletions packages/e2e-test-app/windows/RNTesterApp/App.xaml.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,12 +29,10 @@ public App()
{
#if BUNDLE
JavaScriptBundleFile = "index.windows";
InstanceSettings.UseWebDebugger = false;
InstanceSettings.UseDirectDebugger = false;
InstanceSettings.UseFastRefresh = false;
#else
JavaScriptBundleFile = "app/index";
InstanceSettings.UseWebDebugger = false;
InstanceSettings.UseDirectDebugger = true;
InstanceSettings.UseFastRefresh = true;
#endif
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,11 +23,9 @@ using namespace Windows::ApplicationModel;
App::App() noexcept {
#if BUNDLE
JavaScriptBundleFile(L"index.windows");
InstanceSettings().UseWebDebugger(false);
InstanceSettings().UseFastRefresh(false);
#else
JavaScriptBundleFile(L"index");
InstanceSettings().UseWebDebugger(true);
InstanceSettings().UseFastRefresh(true);
#endif

Expand Down
1 change: 0 additions & 1 deletion packages/playground/CoreApp/App.cpp
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,7 +52,6 @@ int __stdcall wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR /*server*/
app->componentName = L"RNTesterApp";
app->jsBundleFile = LR"(Samples\rntester)";
app->useDeveloperSupport = true;
app->useWebDebugger = false;

#ifdef WITH_MODULES
app->packageProvidersAbiCount = 1;
Expand Down
1 change: 0 additions & 1 deletion packages/playground/CoreApp/app.config.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
// the path to the JS bundle, relative to bundleRootPath. Default value: "index.windows"
"jsBundleFile": "Samples\\rntester",
// "bundleRootPath": "ms-appx:///Bundle/",
"useWebDebugger": false,
// "useFastRefresh": true,
"useDeveloperSupport": true,
// "useDirectDebugger": false,
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -54,7 +54,7 @@ winrt::Windows::UI::Composition::Compositor g_compositor{nullptr};

constexpr auto WindowDataProperty = L"WindowData";

int RunPlayground(int showCmd, bool useWebDebugger);
int RunPlayground(int showCmd);
winrt::Microsoft::ReactNative::IReactPackageProvider CreateStubDeviceInfoPackageProvider() noexcept;

struct WindowData {
Expand DownExpand Up@@ -250,7 +250,7 @@ struct WindowData {
std::thread playgroundThread{([]() {
// For subsequent RN windows do not use the web debugger by default,
// since one instance can be connected to it at a time.
RunPlayground(SW_SHOW, false);
RunPlayground(SW_SHOW);
})};
playgroundThread.detach();
break;
Expand DownExpand Up@@ -497,7 +497,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)

constexpr PCWSTR c_windowClassName = L"MS_REACTNATIVE_PLAYGROUND_COMPOSITION";

int RunPlayground(int showCmd, bool useWebDebugger) {
int RunPlayground(int showCmd) {
constexpr PCWSTR appName = L"React Native Playground (Composition)";

auto windowData = std::make_unique<WindowData>();
Expand DownExpand Up@@ -574,5 +574,5 @@ _Use_decl_annotations_ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE, PSTR
auto playgroundApp{winrt::make<winrt::Playground::implementation::App>()};
#endif

return RunPlayground(showCmd, false);
return RunPlayground(showCmd);
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,7 +42,7 @@ namespace hosting = xaml::Hosting;

constexpr auto WindowDataProperty = L"WindowData";

int RunPlayground(int showCmd, bool useWebDebugger);
int RunPlayground(int showCmd);

HWND GetXamlIslandHwnd(const hosting::DesktopWindowXamlSource &dwxs) {
auto interop = dwxs.as<IDesktopWindowXamlSourceNative>();
Expand All@@ -63,7 +63,6 @@ struct WindowData {
winrt::Microsoft::ReactNative::ReactNativeHost m_host{nullptr};
winrt::Microsoft::ReactNative::ReactInstanceSettings m_instanceSettings{nullptr};

bool m_useWebDebugger{false};
bool m_fastRefreshEnabled{true};
bool m_useDirectDebugger{true};
bool m_breakOnNextLine{false};
Expand DownExpand Up@@ -115,7 +114,6 @@ struct WindowData {

host.InstanceSettings().JavaScriptBundleFile(m_bundleFile);

host.InstanceSettings().UseWebDebugger(m_useWebDebugger);
host.InstanceSettings().UseDirectDebugger(m_useDirectDebugger);
host.InstanceSettings().BundleRootPath(
std::wstring(L"file:").append(workingDir).append(L"\\Bundle\\").c_str());
Expand DownExpand Up@@ -156,7 +154,7 @@ struct WindowData {
std::thread playgroundThread{([]() {
// For subsequent RN windows do not use the web debugger by default,
// since one instance can be connected to it at a time.
RunPlayground(SW_SHOW, false);
RunPlayground(SW_SHOW);
})};
playgroundThread.detach();
break;
Expand DownExpand Up@@ -271,7 +269,6 @@ struct WindowData {
case WM_INITDIALOG: {
auto boolToCheck = [](bool b) { return b ? BST_CHECKED : BST_UNCHECKED; };
auto self = reinterpret_cast<WindowData *>(lparam);
CheckDlgButton(hwnd, IDC_WEBDEBUGGER, boolToCheck(self->m_useWebDebugger));
CheckDlgButton(hwnd, IDC_FASTREFRESH, boolToCheck(self->m_fastRefreshEnabled));
CheckDlgButton(hwnd, IDC_DIRECTDEBUGGER, boolToCheck(self->m_useDirectDebugger));
CheckDlgButton(hwnd, IDC_BREAKONNEXTLINE, boolToCheck(self->m_breakOnNextLine));
Expand All@@ -298,7 +295,6 @@ struct WindowData {
switch (LOWORD(wparam)) {
case IDOK: {
auto self = GetFromWindow(GetParent(hwnd));
self->m_useWebDebugger = IsDlgButtonChecked(hwnd, IDC_WEBDEBUGGER) == BST_CHECKED;
self->m_fastRefreshEnabled = IsDlgButtonChecked(hwnd, IDC_FASTREFRESH) == BST_CHECKED;
self->m_useDirectDebugger = IsDlgButtonChecked(hwnd, IDC_DIRECTDEBUGGER) == BST_CHECKED;
self->m_breakOnNextLine = IsDlgButtonChecked(hwnd, IDC_BREAKONNEXTLINE) == BST_CHECKED;
Expand DownExpand Up@@ -382,7 +378,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)

constexpr PCWSTR c_windowClassName = L"MS_REACTNATIVE_PLAYGROUND_WIN32";

int RunPlayground(int showCmd, bool useWebDebugger) {
int RunPlayground(int showCmd) {
#ifdef USE_WINUI3
constexpr PCWSTR appName = L"React Native Playground (Win32 WinUI3)";
#else
Expand All@@ -401,7 +397,6 @@ int RunPlayground(int showCmd, bool useWebDebugger) {

hosting::DesktopWindowXamlSource desktopXamlSource;
auto windowData = std::make_unique<WindowData>(desktopXamlSource);
windowData->m_useWebDebugger = useWebDebugger;

// We have to use a XAML string here to access the ThemeResource.
// XAML Islands requires us to set the background color to handle theme changes.
Expand DownExpand Up@@ -474,5 +469,5 @@ _Use_decl_annotations_ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE, PSTR
WINRT_VERIFY(classId);
winrt::check_win32(!classId);

return RunPlayground(showCmd, false);
return RunPlayground(showCmd);
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -105,7 +105,6 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSM
CAPTION "Settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL "&Web Debugger",IDC_WEBDEBUGGER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,8,104,10
CONTROL "&Fast Refresh",IDC_FASTREFRESH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,26,104,10
CONTROL "&Direct Debugger",IDC_DIRECTDEBUGGER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,44,104,10
CONTROL "&Break On Next Line",IDC_BREAKONNEXTLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,63,104,10
Expand Down
1 change: 0 additions & 1 deletion packages/playground/windows/playground-win32/resource.h
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
//
#define IDC_PLAYGROUND_WIN32 100
#define IDD_ABOUTBOX 100
#define IDC_WEBDEBUGGER 100
#define IDC_JSBUNDLELIST 100
#define IDM_ABOUT 100
#define IDD_SETTINGSBOX 101
Expand Down
Loading