SDL OSX window opening in wrong Space

I am opening a window in SDL but because I am using Spaces under OSX, which creates a number of different desktops, the window always appears in the very first of Spaces. Since this is not the Space from which I run my debugger, it is a complete disruption of my workflow.

I am already using
but it does not appear to have any effect.

Any suggestions, anyone, what I can do to force the window to open in the current Space?