Forum > Debugger

Debugging Feature request/suggestion

(1/2) > >>

440bx:
Hello,

when debugging a console application it is fairly common to have the console window either partially or totally obscured by other windows (usually Lazarus windows - editor windows, watches, messages, etc.)

Currently to bring the console window to the front, it usually requires using the mouse to click on a partially visible area of the console or click on the taskbar button that represents the app.

It would be much nicer and convenient to have a hotkey to bring the window to the front.

That's the suggestion/request: implement a hotkey to bring the console window to the foreground.

comments welcome.

Martin_fr:
Pretty long shot....

I guess on Windows it is possible, but for console only.

GUI wouldn't work, because it is frozen at that time (unless focus remains for some reason on the IDE, when it was continued with F9 / I don't recall having had that issue)

On Linux, you normally have the IDE build in console window (which may be offered as option under Windows too - at some point).
Or on Linux you have used a "launch app" (though that hasn't worked for a decade) and then the the launch app is an independent app, and wouldn't necessary be tracked...

On Windows, it would depend on the Win API, if you can bring a console window to the front, if all you have is the handle of the process running in it....

And then it would be a windows only feature. Wouldn't reject it, but with the tons of other stuff going on....


Are you aware that with Lazarus 3.99 (Windows) under "Run Params" you can specify the position of the console win. (size or row/column partially works).

So if you have a corner of free space on the screen, you should be able to make sure it will always be there.


Also, if you have just only worked in the IDE, and nothing else, then "Alt Tab" should switch to it?

440bx:

--- Quote from: Martin_fr on August 15, 2024, 10:11:22 pm ---I guess on Windows it is possible, but for console only.

--- End quote ---
Yes, that's correct.


--- Quote from: Martin_fr on August 15, 2024, 10:11:22 pm ---On Windows, it would depend on the Win API, if you can bring a console window to the front, if all you have is the handle of the process running in it....

--- End quote ---
It can be done.  The debugger would need to enumerate the windows and identify the debuggee's window.  To ensure it doesn't do it for GUI apps, it can check what type of process it is debugging (PE subsystem.)  Fortunately, it would only need to do it once.


--- Quote from: Martin_fr on August 15, 2024, 10:11:22 pm ---Are you aware that with Lazarus 3.99 (Windows) under "Run Params" you can specify the position of the console win. (size or row/column partially works).

--- End quote ---
No, I wasn't aware of that.  I use the console's "properties -> layout" (right click on caption) then set the window's width, height and uncheck "let the system position the window".  That puts the console window in a desired location along with window size (horizontal and vertical) as well as setting the screen buffer size.  Very nice is that the settings are persistent, Windows will honor those setting in subsequent runs (even when not being debugged.)  Also nice is that it always works, so far 100% reliable.


--- Quote from: Martin_fr on August 15, 2024, 10:11:22 pm ---Also, if you have just only worked in the IDE, and nothing else, then "Alt Tab" should switch to it?

--- End quote ---
The problem is that my screen is  often _not_ large enough to accommodate the Lazarus windows and the console window.  For instance, in the project I'm working on, I have two Lazarus editor windows and the console window is 160 columns wide (some of the lines output are quite long), my 1920 wide screen is too narrow for that. 

I understand it's not a "critical" feature but, it would be nice to have.  It's a bit unfortunate that it would be Windows-only if it were implemented.

PascalDragon:

--- Quote from: 440bx on August 15, 2024, 09:02:43 pm ---Currently to bring the console window to the front, it usually requires using the mouse to click on a partially visible area of the console or click on the taskbar button that represents the app.
--- End quote ---

Alt + Tab not working for you? That's what I use when debugging the compiler (which is a console application after all as well)...

440bx:

--- Quote from: PascalDragon on August 18, 2024, 11:49:52 am ---Alt + Tab not working for you? That's what I use when debugging the compiler (which is a console application after all as well)...

--- End quote ---
Alt-Tab works if no other application window has been activated between the debugger and the debuggee.  I somewhat often have other apps active to assist in the debugging, e.g, a hex viewer/editor, a PE dump of the exe and, other things as well.  Alt-Tab works well when flipping from two apps but isn't convenient when dealing with multiple apps.

Navigation

[0] Message Index

[#] Next page

Go to full version