debugger support for dx (#3814)

* add vscode debugger for apps

* todo: need to disconnect when rebuilding

* update debugger

* add uri handler to remote launch the debugger

* attach

* dont panic

* fixed it - hung processes are not errors

* wip: android debugger

* clean it up a bit

* revert ios stdout/stderr

* wire up pid from ios

* use target family instead of target_arch

* fix android

* bring back softkill

* typo
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2025-05-24 23:31:42 +01:00
1 parent eb15b42ab1
commit b2bd1f48d4
13 files changed
+305 -41

No files matched your search

+15
View File
@@ -22,6 +22,9 @@ export async function activate(context: vscode.ExtensionContext) {
vscode.commands.registerCommand('extension.formatRsxDocument', formatRsxDocument),
vscode.workspace.onWillSaveTextDocument(fmtDocumentOnSave)
);
context.subscriptions.push(vscode.window.registerUriHandler(new UriLaunchServer()));
}
function translate(component: boolean) {
@@ -171,3 +174,15 @@ function fmtDocument(document: vscode.TextDocument) {
vscode.window.showWarningMessage(`Errors occurred while formatting. Make sure you have the most recent Dioxus-CLI installed! \n${error}`);
}
}
class UriLaunchServer implements vscode.UriHandler {
handleUri(uri: vscode.Uri): vscode.ProviderResult<void> {
if (uri.path === '/debugger') {
let query = decodeURIComponent(uri.query);
let params = new URLSearchParams(query);
let route = params.get('uri');
vscode.window.showInformationMessage(`Opening Chrome debugger: ${route}`);
vscode.commands.executeCommand('extension.js-debug.debugLink', route);
}
}
}