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

Tips for debugging on Windows? #17253

Closed
eugeneo opened this issue Nov 22, 2017 · 7 comments
Closed

Tips for debugging on Windows? #17253

eugeneo opened this issue Nov 22, 2017 · 7 comments
Labels
build Issues and PRs related to build files or the CI. question Issues that look for answers. windows Issues and PRs related to the Windows platform.

Comments

@eugeneo
Copy link
Contributor

eugeneo commented Nov 22, 2017

Is there any guide on debugging core Node.js core on Windows? I open node.vcxproj in VS 2017, do a build. Then when I add a single printf statement to a file, it takes Visual Studio forever to rebuild. I also have tried vcbuild.bat from the command prompt, it is just as slow.

It's also impossible to debug with VS as it did not find some header.

On other platforms (even on a less powerful workstation) rebuild is near instant. This issue is making it impossible to fix those failing tests on Windows...

@bnoordhuis bnoordhuis added build Issues and PRs related to build files or the CI. question Issues that look for answers. windows Issues and PRs related to the Windows platform. labels Nov 22, 2017
@bnoordhuis
Copy link
Member

Paging @nodejs/platform-windows.

@refack
Copy link
Contributor

refack commented Nov 22, 2017

Try building a "Debug" target, linking is much faster (it's the linking that takes several minutes in 100% CPU). But It's possible that a debug build will not reproduce.

Another option is to try reducing the level of link time optimizations:
image

As for GUI debugging, that usually works for me.

@refack
Copy link
Contributor

refack commented Nov 22, 2017

another idea: build using ninja (python configure --dest-cpu=x64 --ninja) and only use VS for debugging (right click project => debug => "start new instance" should not try to build)
image

Also maybe checkout https://x64dbg.com/

@eugeneo
Copy link
Contributor Author

eugeneo commented Nov 22, 2017

Yep, does not repro in Debug build (I'm looking into #15558). So far I traced it into V8 (paused event is triggered multiple times).

Ninja definitely looks like a more comfortable build solution but it is still horribly slow.

@refack
Copy link
Contributor

refack commented Nov 22, 2017

Yeah I had the same experience while trying to dig into #15558... At least now we have a positive-control to check how link optimizations affect the binary.

BTW: did you check that all accesses to libuv are thread safe?

@eugeneo
Copy link
Contributor Author

eugeneo commented Nov 22, 2017

@refack

I dumped my findings so far on that PR. I will keep investigating.

@bzoz
Copy link
Contributor

bzoz commented Feb 21, 2018

The rebuild time should be fixed by #17393

@bzoz bzoz closed this as completed Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. question Issues that look for answers. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

No branches or pull requests

4 participants