Open mysticfarer opened 2 years ago
勾选 Edit->Editor Preferences->Enable Live Coding 后, vscode/devtool会无法attach到8080调试端口。
Edit
Editor Preferences
Enable Live Coding
UnrealEditor以子进程形式创建LiveCodingConsole,并inherite了父进程中的listen fd, 导致父进程中V8Inspector无法close listen fd,进而导致重建时无法再次监听8080端口。
影响不是很大,禁用Live Coding就能避免此问题; 但部分项目或引擎可能默认启用了Live Coding,造成TS无法调试,会对使用者带来困惑。
对V8Inspector里的listen fd设置FD_CLOEXEC能直接解决此问题, 但拿到fd的相关代码封装有点深,未再深入跟进。
FD_CLOEXEC
设置FD_CLOEXEC,window下也可以么?
detail | 详细描述
勾选
Edit
->Editor Preferences
->Enable Live Coding
后, vscode/devtool会无法attach到8080调试端口。原因
UnrealEditor以子进程形式创建LiveCodingConsole,并inherite了父进程中的listen fd, 导致父进程中V8Inspector无法close listen fd,进而导致重建时无法再次监听8080端口。