View Issue Details

IDProjectCategoryView StatusLast Update
0014294LazarusIDEpublic2019-04-22 19:30
ReporterMartin FriebeAssigned ToMartin Friebe 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.27 (SVN)Product Build 
Target Version1.2.0Fixed in Version0.9.30 
Summary0014294: Stop debug with ctrl-F2, moves focus away from Editor
DescriptionIf you are debugging an application, and the sourceeditor has focus: press ctrl-F2.

This will stop your running app, and unfocus the editor. The problem is caused by Application.BringToFront (presumingly it moves the focus to the apps main window)

The same happens, if you close the debugged app from within the app (close-button) => the focus ends up somewhere else. It shoold be on the last focused control of the IDE in this case

related to 0009883
Additional Information0000044 TWIN32WIDGETSET__APPBRINGTOFRONT(0x96900a8) at win32object.inc:225
0000045 TAPPLICATION__BRINGTOFRONT(0x1bf868) at .\include\application.inc:197
0000046 TDEBUGMANAGER__DEBUGGERCHANGESTATE(0xb956d40, DSRUN, 0x2114b0) at debugmanager.pas:1480
0000047 TDEBUGGER__DOSTATE(DSRUN, 0xb956d40) at C:\lazarus_latest\debugger\debugger.pp:1556
0000048 TGDBMIDEBUGGER__DOSTATE(DSRUN, 0xb956d40) at C:\lazarus_latest\debugger\gdbmidebugger.pp:1151
0000049 TDEBUGGER__SETSTATE(DSSTOP, 0xb956d40) at C:\lazarus_latest\debugger\debugger.pp:1774
0000050 TGDBMIDEBUGGER__EXECUTECOMMANDFULL(0xedf538 '-exec-continue', <incomplete type>, [], 0, 0, {STATE = DSRUN, VALUES = 0x0, FLAGS = []}, -1, 0xb956d40) at C:\lazarus_latest\debugger\gdbmidebugger.pp:1252
0000051 TGDBMIDEBUGGER__EXECUTECOMMAND(0xedf538 '-exec-continue', [], 0xb956d40) at C:\lazarus_latest\debugger\gdbmidebugger.pp:1159
0000052 TGDBMIDEBUGGER__STARTDEBUGGING(0xedf538 '-exec-continue', 0xb956d40) at C:\lazarus_latest\debugger\gdbmidebugger.pp:3190
#53 TGDBMIDEBUGGER__GDBRUN(0xb956d40) at C:\lazarus_latest\debugger\gdbmidebugger.pp:1779
#54 TGDBMIDEBUGGER__REQUESTCOMMAND(DCRUN, <incomplete type>, -1, 0xb956d40) at C:\lazarus_latest\debugger\gdbmidebugger.pp:2842
0000055 TDEBUGGER__REQCMD(DCRUN, <incomplete type>, -1, 0xb956d40) at C:\lazarus_latest\debugger\debugger.pp:1684
0000056 TDEBUGGER__RUN(0xb956d40) at C:\lazarus_latest\debugger\debugger.pp:1698
0000057 TDEBUGMANAGER__RUNDEBUGGER(0x2114b0) at debugmanager.pas:2320
0000058 TMAINIDE__DORUNPROJECT(0x9710c10) at main.pp:9777
0000059 TMAINIDE__ONPROCESSIDECOMMAND(0x98c0cb0, 1405, true, 0x9710c10) at main.pp:2794
0000060 TSOURCENOTEBOOK__PROCESSPARENTCOMMAND(0xbb585e8, 1405, '', 0x0, true, 0x98c0cb0) at sourceeditor.pp:6430
0000061 TSOURCEEDITOR__PROCESSUSERCOMMAND(0xc435548, 1405, '', 0x0, 0xbb585e8) at sourceeditor.pp:1778
0000062 TCUSTOMSYNEDIT__DOONPROCESSCOMMAND(1405, '', 0x0, 0xc435548) at synedit.pp:6093
0000063 TCUSTOMSYNEDIT__COMMANDPROCESSOR(1405, '', 0x0, 0xc435548) at synedit.pp:5471
0000064 TCUSTOMSYNEDIT__KEYDOWN(0, [], 0xc435548) at synedit.pp:2249
0000065 TWINCONTROL__KEYDOWNBEFOREINTERFACE(0, [], 0xc435548) at .\include\wincontrol.inc:5148
0000066 TWINCONTROL__DOKEYDOWNBEFOREINTERFACE({MSG = 48384, CHARCODE = 0, UNUSED = 2440, KEYDATA = 4390913, RESULT = 0}, 0xc435548) at .\include\wincontrol.inc:5284
TagsNo tags attached.
Fixed in Revision
LazTarget1.2
WidgetsetWin32/Win64
Attached Files

Relationships

related to 0012020 closedMattias Gaertner Patches If "Show compile dialog" is active, the focus is put to the messages window when the compilation done 
has duplicate 0015279 closedJuha Manninen Lazarus The focus does not return to the IDE after closing the running program 
related to 0009883 closedVincent Snijders Lazarus Editor doesn't get focus after successfull run 
related to 0014789 resolvedPaul Ishenin Lazarus Patch: Focus lost when execution stops 
related to 0015494 closedPaul Ishenin Lazarus Trouble with focus 
related to 0015967 closedJuha Manninen Lazarus When debugging a GUI application and breakpoint is hit, focus doesn't move to editor 

Activities

Juha Manninen

2010-03-12 00:13

developer   ~0035300

Last edited: 2010-03-12 00:31

The same happens when debugging and the program hits a breakpoint.
F7, F8 and F9 don't work before clicking the editor window with mouse.
Then the application runs again, does something UI related and hits a breakpoint.
Again you must click with mouse before continuing.
This is annoying when it happens all the time.
Edit: Actually this is a slightly different case and worth its own issue number.

This seems to be fixed (at least in gtk2) with the related fixes from Paul and Vincent.

samuel herzog

2010-03-16 06:22

developer   ~0035613

Yes, I tested today on win32. Looks ok now.
Checked with WinXP SP3 32bit.
For starters the Message Window is focused right at the beginning of the compilation.
Then, when finishing debugger, the focus is nowhere in the IDE, no matter whether the application is closed normally, terminated with Ctrl+F2 with focus in SourceEditor, debugger options "show message on stop" is enabled or not.

Juha Manninen

2011-08-16 21:30

developer   ~0050882

Fixed in the meantime.
I still can reproduce. The bug doesn't explicit cites the "Focus Message after compilation" preference, but it says "the editor loses focus". If the preference is checked, the IDE -ahem- correctly focuses the message window after Compilation (successful or not) or Run, but if it's unchecked, the focus is never returned to the source editor.

Paul Ishenin

2012-03-26 04:18

manager   ~0058026

Please test now

Martin Friebe

2012-03-26 15:12

manager   ~0058051

Thanks appears to work with all combinations

Issue History

Date Modified Username Field Change
2009-08-08 18:54 Martin Friebe New Issue
2009-08-08 18:54 Martin Friebe LazTarget => -
2009-08-08 18:54 Martin Friebe Widgetset => Win32/Win64
2009-08-08 19:06 Vincent Snijders Relationship added related to 0009883
2009-08-08 20:06 Vincent Snijders LazTarget - => 1.0
2009-08-08 20:06 Vincent Snijders Status new => acknowledged
2009-08-08 20:06 Vincent Snijders Target Version => 1.0.0
2009-10-13 01:30 Martin Friebe Relationship added related to 0014789
2009-12-08 13:06 Martin Friebe Relationship added has duplicate 0015279
2010-01-23 10:43 Dmitry Boyarintsev Relationship added related to 0015494
2010-03-12 00:13 Juha Manninen Note Added: 0035300
2010-03-12 00:31 Juha Manninen Note Edited: 0035300
2010-03-12 15:50 Flávio Etrusco (notifications not working) Note Added: 0035352
2010-03-12 15:50 Flávio Etrusco (notifications not working) Status acknowledged => feedback
2010-03-12 17:05 Flávio Etrusco (notifications not working) Status feedback => acknowledged
2010-03-16 06:22 samuel herzog Note Added: 0035613
2010-03-16 18:48 samuel herzog LazTarget 1.0 => 0.9.30
2010-03-16 18:48 samuel herzog Status acknowledged => resolved
2010-03-16 18:48 samuel herzog Fixed in Version => 0.9.30
2010-03-16 18:48 samuel herzog Resolution open => fixed
2010-03-16 18:48 samuel herzog Assigned To => samuel herzog
2010-03-16 18:48 samuel herzog Target Version 1.0.0 => 0.9.30
2010-03-16 22:00 Flávio Etrusco (notifications not working) LazTarget 0.9.30 => 1.2
2010-03-16 22:00 Flávio Etrusco (notifications not working) Assigned To samuel herzog =>
2010-03-16 22:00 Flávio Etrusco (notifications not working) Status resolved => assigned
2010-03-16 22:00 Flávio Etrusco (notifications not working) Resolution fixed => reopened
2010-03-16 22:00 Flávio Etrusco (notifications not working) Note Added: 0035669
2010-03-16 22:01 Flávio Etrusco (notifications not working) Target Version 0.9.30 => 1.0.0
2010-03-30 10:57 Flávio Etrusco (notifications not working) Relationship added related to 0012020
2010-12-19 17:02 Juha Manninen Relationship added related to 0015967
2011-08-16 21:29 Juha Manninen Assigned To => Juha Manninen
2011-08-16 21:30 Juha Manninen Status assigned => resolved
2011-08-16 21:30 Juha Manninen Resolution reopened => fixed
2011-08-16 21:30 Juha Manninen Note Added: 0050882
2011-08-18 06:23 Flávio Etrusco (notifications not working) Assigned To Juha Manninen =>
2011-08-18 06:23 Flávio Etrusco (notifications not working) Status resolved => assigned
2011-08-18 06:23 Flávio Etrusco (notifications not working) Resolution fixed => reopened
2011-08-18 06:23 Flávio Etrusco (notifications not working) Note Added: 0050914
2011-08-18 19:46 Juha Manninen Status assigned => acknowledged
2011-10-07 18:36 Vincent Snijders Target Version 1.0.0 => 1.2.0
2012-03-26 04:18 Paul Ishenin Note Added: 0058026
2012-03-26 04:18 Paul Ishenin Status acknowledged => feedback
2012-03-26 15:12 Martin Friebe Status feedback => resolved
2012-03-26 15:12 Martin Friebe Resolution reopened => fixed
2012-03-26 15:12 Martin Friebe Assigned To => Martin Friebe
2012-03-26 15:12 Martin Friebe Note Added: 0058051
2019-04-22 19:30 Martin Friebe Status resolved => closed