https://bugs.winehq.org/show_bug.cgi?id=45749
--- Comment #4 from jimbo1qaz jimbo1qaz@gmail.com --- i think trying to debug a spawned process is futile. instead let winedbg or x32dbg-in-wine launch the process itself.
Unfortunately vs_installershell.exe kept popping up a win32 dialog box error and/or argument error. inspecting servicehub.config.json reveals: ..."additionalEnvironmentVariables" : { "ELECTRON_RUN_AS_NODE": "true" }
I have constructed a method of debugging the subprocess directly via winedbg:
cd WINEPREFIX/drive_c/Program Files/Microsoft Visual Studio/Installer/resources/app ELECTRON_RUN_AS_NODE=true winedbg "C:\Program Files\Microsoft Visual Studio\Installer\vs_installershell.exe" ./node_modules/microsoft-servicehub/host/HubController.js 5d74f51d8cc5d690c261c26d3e9e3408e060bd352875558b9320be9c213e0610
Then type:
b uv_pipe_init b uv_pipe_pending_instances b uv_pipe_bind b uv_listen b uv_pipe_listen c
Sadly uv_pipe_listen cannot be breakpointed (all others work fine).
--------
uv_pipe_init get called 4 times. uv_pipe_bind gets called once. The process terminates and uv_listen is not called.
I am currently debugging uv_pipe_init via winedbg, using https://github.com/nodejs/node/blob/v8.9.3/deps/uv/src/win/pipe.c as a reference.