emscripten-core / emscripten-core/emscripten

Enabling -sSOCKET_DEBUG= spams console with all kinds of debugging unrelated to sockets debugging.

Open
#22,551 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

I am investigating a bug in our code regarding __syscall_send in pthreads proxied builds. Code works in singlethreaded builds, but doesn't in multithreaded. To quickly be able to figure out what is the discrepancy between ST and MT builds, I want to enable `-sSOCKET_DEBUG=1` to be able to dump the WebSockets comms in each.

However, when I do that, I get a build that spams to me all sorts of other debug info and the interesting information that I want to debug with WebSockets is drowned in the noise:

![image](https://github.com/user-attachments/assets/90bb2f0e-bd73-4ea7-bc78-5edb4b136ada)

making it impossible to find the actual sockets debug prints.

I see there's this construct:

![image](https://github.com/user-attachments/assets/86e22b95-b989-4c29-b298-81225326feff)

and hence

![image](https://github.com/user-attachments/assets/38ef11e4-8f32-4506-80c3-42a577932709)

Locally I can get rid of this by deleting the line

![image](https://github.com/user-attachments/assets/f2465aa7-ddc8-4fa9-a15f-85ed00634bca)

but it doesn't seem that `SOCKET_DEBUG` (or any of those `xxx_DEBUG`s for that matter?) should imply `RUNTIME_DEBUG`, that is counterproductive?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.