Skip to content

Commit 2eb2319

Browse files
tiegebentleyclaude
andcommitted
feat(desktop): support remote debugging port via env var
When REMOTE_DEBUGGING_PORT is set, pass --remote-debugging-port and --remote-allow-origins=* to Electron so Chrome DevTools can attach from a remote machine. Also fix a pre-existing biome lint warning (useless ternary in AddCustomProviderModal). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5c3a42c commit 2eb2319

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

apps/desktop/scripts/dev.cjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ if (process.getuid && process.getuid() === 0 && !env.NO_SANDBOX) {
1818
env.NO_SANDBOX = '1';
1919
}
2020

21+
if (process.env.REMOTE_DEBUGGING_PORT) {
22+
env.ELECTRON_CLI_ARGS = JSON.stringify([
23+
`--remote-debugging-port=${process.env.REMOTE_DEBUGGING_PORT}`,
24+
'--remote-allow-origins=*',
25+
]);
26+
}
27+
2128
const child = spawn(process.execPath, [electronViteBin, 'dev', ...process.argv.slice(2)], {
2229
env,
2330
stdio: ['inherit', 'inherit', 'pipe'],

apps/desktop/src/renderer/src/components/AddCustomProviderModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ export function AddCustomProviderModal({
298298
if (!editTarget.builtin) {
299299
const previous = editTarget.tlsRejectUnauthorized === true;
300300
if (previous !== tlsRejectUnauthorized) {
301-
update.tlsRejectUnauthorized = tlsRejectUnauthorized ? true : false;
301+
update.tlsRejectUnauthorized = !!tlsRejectUnauthorized;
302302
}
303303
}
304304
await window.codesign.config.updateProvider(update);

0 commit comments

Comments
 (0)