You cannot directly use pdb or pudb to step into the EngineCore process in vLLM, because EngineCore runs in a separate process and its IO is redirected, which breaks interactive debuggers like pdb/pudb. This limitation is acknowledged in the vLLM community, and there is no officially supported way to attach pdb/pudb to the EngineCore process as of now. The only workaround mentioned is to use print statements, but this is not ideal for complex debugging tasks. For multi-process debugging, some users suggest using tools like forked-pdb, but this is not documented or officially supported by vLLM (github issue 9602).
Would you like more detail on alternative debugging strategies or how to use forked-pdb in this context?
Sources: