Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

按着调试文档步骤调试无法生成frontend_server参数 #8

Closed
luckyBoyFeng opened this issue Jun 14, 2022 · 4 comments
Closed

Comments

@luckyBoyFeng
Copy link

按着调试文档调试流程调试,在调试Flutter_tools时获取不到frontend_server参数。想问一下我的配置参数是否错误。 在Dart Command Line App中我的Working directory 选择的是Beike_AspectD/example文件,想问一下是不是这个选择的不对导致的。希望得到解答。
image

@soloxiao
Copy link
Collaborator

soloxiao commented Jun 14, 2022

按着调试文档调试流程调试,在调试Flutter_tools时获取不到frontend_server参数。想问一下我的配置参数是否错误。 在Dart Command Line App中我的Working directory 选择的是Beike_AspectD/example文件,想问一下是不是这个选择的不对导致的。希望得到解答。
image

image
这一步patch是否成功?

可以尝试在下面这一行打断点来获取参数。

image

另外,debug之前需在example工程中执行flutter clean。

@luckyBoyFeng
Copy link
Author

严格按照上述步骤执行到flutter_tools.dart步骤时还是未获取到frontend_server参数,以下是报错日志:
The Dart DevTools debugger and profiler is available at: http://127.0.0.1:54959/C4tzlXkoSoc=/devtools/#/?uri=ws%3A%2F%2F127.0.0.1%3A54959%2FC4tzlXkoSoc%3D%2Fws
lib/main.dart--verbose
[ +105 ms] executing: sysctl hw.optional.arm64
[ +28 ms] Exit code 1 from: sysctl hw.optional.arm64
[ +1 ms] sysctl: unknown oid 'hw.optional.arm64'
[ +7 ms] executing: [/Users/aa/workspace/flutter/sdk/home/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +46 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] 18116933e77adc82f80866c928266a5b4f1ed645
[ +1 ms] executing: [/Users/aa/workspace/flutter/sdk/home/] git tag --points-at 18116933e77adc82f80866c928266a5b4f1ed645
[ +111 ms] Exit code 0 from: git tag --points-at 18116933e77adc82f80866c928266a5b4f1ed645
[ ] 2.5.3
[ +10 ms] executing: [/Users/aa/workspace/flutter/sdk/home/] git rev-parse --abbrev-ref --symbolic @{u}
[ +17 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/stable
[ ] executing: [/Users/aa/workspace/flutter/sdk/home/] git ls-remote --get-url origin
[ +13 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ +141 ms] executing: [/Users/aa/workspace/flutter/sdk/fhome/] git rev-parse --abbrev-ref HEAD
[ +53 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ +5 ms] stable
[ +13 ms] executing: sw_vers -productName
[ +39 ms] Exit code 0 from: sw_vers -productName
[ ] macOS
[ ] executing: sw_vers -productVersion
[ +25 ms] Exit code 0 from: sw_vers -productVersion
[ ] 11.6.2
[ ] executing: sw_vers -buildVersion
[ +24 ms] Exit code 0 from: sw_vers -buildVersion
[ +1 ms] 20G314
[ +66 ms] Could not find a command named "lib/main.dart".

[ +4 ms] Run 'flutter -h' (or 'flutter -h') for available flutter commands and options.
[ +11 ms] ensureAnalyticsSent: 8ms
[ +2 ms] Running shutdown hooks
[ ] Shutdown hooks complete
[ +2 ms] exiting with code 64

Process finished with exit code 64

@luckyBoyFeng
Copy link
Author

在执行 git apply --3way /Users/aa/workspace2/Beike_AspectD/inner/flutter_tools.patch 时发现控制台报错了,以下是报错日志:
error: packages/flutter_tools/lib/src/aop/aop_manager.dart: does not exist in index
error: cannot read the current contents of 'packages/flutter_tools/lib/src/aop/aop_manager.dart'
Falling back to direct application...
error: packages/flutter_tools/lib/src/aop/hook_factory.dart: does not exist in index
error: cannot read the current contents of 'packages/flutter_tools/lib/src/aop/hook_factory.dart'
Falling back to direct application...
error: packages/flutter_tools/lib/src/aspectd.dart: does not exist in index
error: cannot read the current contents of 'packages/flutter_tools/lib/src/aspectd.dart'
Falling back to direct application...
error: packages/flutter_tools/lib/src/build_system/targets/common.dart: does not match index
error: packages/flutter_tools/lib/src/build_system/targets/web.dart: does not match index
error: packages/flutter_tools/lib/src/commands/build_bundle.dart: does not match index
error: packages/flutter_tools/lib/src/compile.dart: does not match index
error: packages/flutter_tools/lib/src/web/chrome.dart: does not match index

我在flutter_tools发现了补丁文件:
image

@soloxiao
Copy link
Collaborator

soloxiao commented Jun 16, 2022

在执行 git apply --3way /Users/aa/workspace2/Beike_AspectD/inner/flutter_tools.patch 时发现控制台报错了,以下是报错日志: error: packages/flutter_tools/lib/src/aop/aop_manager.dart: does not exist in index error: cannot read the current contents of 'packages/flutter_tools/lib/src/aop/aop_manager.dart' Falling back to direct application... error: packages/flutter_tools/lib/src/aop/hook_factory.dart: does not exist in index error: cannot read the current contents of 'packages/flutter_tools/lib/src/aop/hook_factory.dart' Falling back to direct application... error: packages/flutter_tools/lib/src/aspectd.dart: does not exist in index error: cannot read the current contents of 'packages/flutter_tools/lib/src/aspectd.dart' Falling back to direct application... error: packages/flutter_tools/lib/src/build_system/targets/common.dart: does not match index error: packages/flutter_tools/lib/src/build_system/targets/web.dart: does not match index error: packages/flutter_tools/lib/src/commands/build_bundle.dart: does not match index error: packages/flutter_tools/lib/src/compile.dart: does not match index error: packages/flutter_tools/lib/src/web/chrome.dart: does not match index

我在flutter_tools发现了补丁文件: image

可以用2.5.3分支最新的patch文件试试吗?我更新了patch文件。

需要注意的是,patch apply需要从flutter根目录下执行,如下图。

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants