From 993d1a8a276ac0015d46163d94b5309e251d0742 Mon Sep 17 00:00:00 2001 From: tsuiyuenhong Date: Sun, 19 Jun 2022 22:00:33 +0800 Subject: [PATCH 1/3] chore: support debugging rust in vscode(macos) --- frontend/.vscode/launch.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/frontend/.vscode/launch.json b/frontend/.vscode/launch.json index c7bfca84aa..825c51cc5c 100644 --- a/frontend/.vscode/launch.json +++ b/frontend/.vscode/launch.json @@ -16,6 +16,20 @@ }, "cwd": "${workspaceRoot}/app_flowy" }, + { + "name": "AF: Debug Rust", + "request": "attach", + "type": "lldb", + "windows": { + "program": "" // FIXME: windows executable path + }, + "osx": { + "program": "${workspaceRoot}/app_flowy/build/macos/Build/Products/Debug/AppFlowy.app", + }, + "linux": { + "program": "" // FIXME: linux executable path + }, + }, { // This task only builds the Dart code of AppFlowy. "name": "AF: Build Dart Only", From 27bd4bb24200675f9db9dca0a082cf80b77cc968 Mon Sep 17 00:00:00 2001 From: tsuiyuenhong Date: Tue, 21 Jun 2022 18:44:06 +0800 Subject: [PATCH 2/3] chore: fix linux(aarch64) build --- .gitignore | 9 ++++++++- frontend/.vscode/tasks.json | 2 +- frontend/scripts/build_sdk.sh | 8 ++------ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index af41db7ae0..ab5f64486f 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,11 @@ node_modules **/.DS_Store **/src/protobuf -**/resources/proto \ No newline at end of file +**/resources/proto + +frontend/.vscode/* +!frontend/.vscode/settings.json +!frontend/.vscode/tasks.json +!frontend/.vscode/launch.json +!frontend/.vscode/extensions.json +!frontend/.vscode/*.code-snippets \ No newline at end of file diff --git a/frontend/.vscode/tasks.json b/frontend/.vscode/tasks.json index 7ccb8ae3fe..769ecd9b28 100644 --- a/frontend/.vscode/tasks.json +++ b/frontend/.vscode/tasks.json @@ -49,7 +49,7 @@ "linux": { "options": { "env": { - "FLOWY_DEV_ENV": "Linux-x86" + "FLOWY_DEV_ENV": "Linux" } } }, diff --git a/frontend/scripts/build_sdk.sh b/frontend/scripts/build_sdk.sh index 330bd22738..cfe6bdb316 100755 --- a/frontend/scripts/build_sdk.sh +++ b/frontend/scripts/build_sdk.sh @@ -16,12 +16,8 @@ rustup show case "$FLOWY_DEV_ENV" in -Linux-aarch64) - cargo make --profile development-linux-aarch64 flowy-sdk-dev - ;; - -Linux-x86) - cargo make --profile development-linux-x86 flowy-sdk-dev +Linux) + cargo make --profile "development-linux-$(uname -m)" flowy-sdk-dev ;; macOS) From fd6208100cc24b1aff5962de2bb666eff788c4b2 Mon Sep 17 00:00:00 2001 From: tsuiyuenhong Date: Tue, 21 Jun 2022 20:25:52 +0800 Subject: [PATCH 3/3] chore: support debugging rust in vscode --- frontend/.vscode/launch.json | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/frontend/.vscode/launch.json b/frontend/.vscode/launch.json index 825c51cc5c..315e208317 100644 --- a/frontend/.vscode/launch.json +++ b/frontend/.vscode/launch.json @@ -20,15 +20,7 @@ "name": "AF: Debug Rust", "request": "attach", "type": "lldb", - "windows": { - "program": "" // FIXME: windows executable path - }, - "osx": { - "program": "${workspaceRoot}/app_flowy/build/macos/Build/Products/Debug/AppFlowy.app", - }, - "linux": { - "program": "" // FIXME: linux executable path - }, + "pid": "${command:pickMyProcess}" }, { // This task only builds the Dart code of AppFlowy.