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...
Paging @nodejs/platform-windows.
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:

As for GUI debugging, that usually works for me.
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)

Also maybe checkout https://x64dbg.com/
Yep, does not repro in Debug build (I'm looking into https://github.com/nodejs/node/issues/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.
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?
@refack
I dumped my findings so far on that PR. I will keep investigating.
The rebuild time should be fixed by https://github.com/nodejs/node/pull/17393