vshaxe / hashlink-debugger

Visual Studio Code Debugger for Haxe/HashLink applications
https://hashlink.haxe.org/
MIT License
57 stars 23 forks source link

DXError during debug #51

Closed moreginger closed 5 years ago

moreginger commented 5 years ago

See https://community.heaps.io/t/heaps-with-hashlink-debugger-issue/53

This seems to happen on dual GPU (Intel/Nvidia) Windows systems. When attempting to debug from vscode the program fails with an error like:

hldx / NVIDIA GeForce MX150: DXError 8007000E line 184 Called from h3d.impl.DirectXDriver.onDXError (h3d/impl/DirectXDriver.hx line 193)

Or other variants if forcing Intel GPU.

However, it's possible to start the debugger from the command line and attach to it. @ncannasse pointed me to the env supplied to node.spawn in HLAdapter.hx. Indeed omitting the empty env is sufficient to fix the issue. I'll provide a MR for a minimal env that works for me.