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

[Bug]: can't build electron with debugging page guide #41674

Closed
3 tasks done
weihongfei opened this issue Mar 23, 2024 · 5 comments
Closed
3 tasks done

[Bug]: can't build electron with debugging page guide #41674

weihongfei opened this issue Mar 23, 2024 · 5 comments
Labels

Comments

@weihongfei
Copy link

Preflight Checklist

Electron Version

Electron v31.0.0-nightly.20240315

What operating system are you using?

Windows

Operating System Version

windows 11

What arch are you using?

x64

Last Known Working Electron version

no

Expected Behavior

https://www.electronjs.org/docs/latest/development/debugging
fllowing this guide can build correctly

Actual Behavior

link electron.exe error

ninja: Entering directory `out\Debug'
[1/2] LINK electron.exe electron.exe.pdb
FAILED: electron.exe electron.exe.pdb
....\third_party\llvm-build\Release+Asserts\bin\lld-link.exe "/OUT:./electron.exe" /nologo -libpath:....\third_party\llvm-build\Release+Asserts\lib\clang\19\lib\windows "-libpath:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\ATLMFC\lib\x64" "-libpath:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64" "-libpath:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "-libpath:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64" "-libpath:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64" /MACHINE:X64 "/PDB:./electron.exe.pdb" "@./electron.exe.rsp"
lld-link: error: undefined symbol: protected: virtual class ExtensionFunction::ResponseAction __cdecl extensions::ExtensionActionOpenPopupFunction::RunExtensionAction(void)

referenced by obj/electron/shell/browser/extensions/api\api_registration/generated_api_registration.obj:(const extensions::ExtensionActionOpenPopupFunction::`vftable')
ninja: build stopped: subcommand failed.

Testcase Gist URL

No response

Additional Information

No response

@weihongfei
Copy link
Author

can anybody help me?

@weihongfei
Copy link
Author

Breakpoint Debugging
Note that this will increase the size of the build significantly, taking up around 50G of disk space

Write the following file to electron/.git/info/exclude/debug.gn

import("//electron/build/args/testing.gn")
is_debug = true
symbol_level = 2
forbid_non_component_debug_builds = false

Then execute:

$ gn gen out/Debug --args="import("//electron/.git/info/exclude/debug.gn") $GN_EXTRA_ARGS"
$ ninja -C out/Debug electron

Now you can use LLDB for breakpoint debugging.

@weihongfei
Copy link
Author

is_debug flag will cause errors,

@codebytere
Copy link
Member

Thanks for reaching out!

Because we treat our issues list as the team's backlog, we close issues that are questions since they don't represent a task needing to be completed. This forum is for raising bugs or requesting new features, and for most questions about Electron there are a lot of more appropriate community options. There are helpful people in this Discord or the subreddit that should be willing to point you in the right direction.

@codebytere codebytere closed this as not planned Won't fix, can't repro, duplicate, stale Mar 23, 2024
@yanite
Copy link

yanite commented May 5, 2024

is_debug标志将导致错误,

extension_action_api.cc add function

ExtensionFunction::ResponseAction
ExtensionActionOpenPopupFunction::RunExtensionAction() {
LOG(INFO) << "chrome.action.getPopup is not supported in Electron";

return RespondNow(WithArguments(""));
}

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

No branches or pull requests

3 participants