NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
IDE does not get focus when debug session starts


Joined: 17 Dec 2004
Posts: 12
Location: Surrey, England
Reply with quote
I have just replaced my old Windows XP 32bit laptop with a new one running Windows 7 64 bit and I have noticed something frustrating:

(1) When initiating a debug session from my browser the PhpED icon in the taskbar is highlighted, but the IDE does not get focus (ie. it remains in the background instead of being brought to the foreground). I initially thought that the debugger wasn't working at all until I clicked on the taskbar icon and then I could see it waiting for me to make the next move. With Windows XP I never had to click the icon as the IDE was brought to the foreground automatically. Is this a bug when running on Windows 7?

(2) When the debug session starts the IDE gives focus to the tab containg the running script, but does not adjust the scrolling to show the current line. This means that for a long script which finished previously at the last line and has now been halted at the first line, the window is still positioned on the last line which means that I have to scroll backwards through the script in order to find the line where the debugger stopped.
View user's profileFind all posts by TonyMarstonSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
It's SetForegroundWindow() controls which window receives focus. PhpED certainly calls this function but there are some limitations IMPOSED by the OS:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633539(v=vs.85).aspx
If such limitation didn't allow a particular application to bring itself to foreground, task bar starts flushing corresponding button.

Regarding scrolling to the debugger's current line, I was unable to reproduce the problem.
Please contact support and provide all the details (a sample of 1-2 files would be okay)

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 17 Dec 2004
Posts: 12
Location: Surrey, England
Reply with quote
This worked in Windows XP, so it sounds like Microsoft have stupidly disabled perfectly acceptable behaviour for no good reason.

Have you thought of using the ForceForegroundWindow function? This is documented in http://msdn.microsoft.com/en-us/library/windows/desktop/ms633539(v=vs.85).aspx
View user's profileFind all posts by TonyMarstonSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
and what? Those limits didn't exist even 8years ago!
Now seems they are enforced in higher level. World is changing.
Perhaps, it's an MS way of fighting aginst annoying applications?
I don't know. Ask MS.

PS
Regarding tricks with attaching gui thread (it's what behind that ForceXXXX) -- it's not a good way _because_ if it fails (because of the limits), you'll not see even flushing button in the task bar.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
IDE does not get focus when debug session starts
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic