This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 202153

Summary: StepInto doesn't work if "Auto Start Process After Program Was Loaded" is unchecked
Product: cnd Reporter: Chihin Ko <chihinko>
Component: DebuggerAssignee: Chihin Ko <chihinko>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P2    
Version: 7.0.1   
Hardware: Sun   
OS: Solaris   
Issue Type: DEFECT Exception Reporter:

Description Chihin Ko 2011-09-15 03:14:47 UTC
Reported by beta customer Cadence.

Start a session.
Uncheck "Auto Start Process After Program Was Loaded" from
Tools | Options | C/C++ |Debugging Options | Session 
Observe that the dbx cmdline echoes "### dbxenv run_autostart off"
if you uncheck "Auto Start Process After Program Was Loaded".

There are two bugs here:

(1) There are two distinct concepts that sound similar and that similarity
must've gotten someone confused.

dbxenv run_autostart _only_ governs whether step/next/cont will automatically
start the program. This is independent of the IDE and applies equally well to
dbx cmdline. Additionally for StepInto to work under the IDE it
has to be set to 'on'.

That "Auto Start Process After Program Was Loaded" modifies run_autostart is
a bug. The two have nothing to do with each other.

So, a user who favors Debug to not automatically run the program,
has unchecked "Auto Start Process After Program Was Loaded". This,
incorrectly, sets run_autostart to off which has the effect of breaking StepInto!
    That is, if run_autostart is off "next" will say "No live session"
    as we've seen.

in general, whenunder the IDE, "dbxenv run_autostart" should always be on
since w/o it StepInto will not work.

(2) the echoing of "### dbxenv run_autostart off" is only observed if there's a
live session. But if you change the global flags when there are no sessions
and start a session you don't see "### dbxenv run_autostart off". THe
GUi code  I think is smart enough to not change the value if it's
identical to the default but then the echo should appear for at least on of 
"Auto Start Process After Program Was Loaded" being set to on or
off.
Comment 1 Chihin Ko 2011-09-15 03:26:14 UTC
  RUN_AUTOSTART option govern two functionalities :

  - For GUI it govern if we want to issue "run" right after program was loaded
  - It also control engine option "dbxenv run_autostart", which in turn govern
    if next/step/cont valid commands if process is not alive

  In IDE, we want "dbxenv run_autostart" always on, so user and do "StepInto" a project.

  And in AUTOSTART option property "is engine option" should be default to "false",
  so when this option is unchecked, "dbxenv run_autostart" won't be set to "off".
Comment 2 Egor Ushakov 2011-09-19 14:32:17 UTC
fix is in:
http://hg.netbeans.org/cnd-main/rev/bbbdfac4f7d0
Comment 3 Egor Ushakov 2011-09-21 15:35:03 UTC
fix is reviewed and looks safe
Comment 4 Vladimir Voskresensky 2011-09-21 15:46:15 UTC
integrated into releases_elif as 791814526f2a
Comment 5 Alexander Pepin 2011-09-22 16:27:04 UTC
verified in sputnik-solstudio-main build #3313 (20110922)
Now the behavior is the following:
if a user unchecks "Auto Start Process After Program Was Loaded" then "### dbxenv run_autostart off" does not appear in debugger console but when a user starts debugging next time the current position line in the editor is not highlighted in green and shown in grey (like in dbxtool) and becomes green after StepOver. It looks like "Auto Start Process After Program Was Loaded" checked on after starting the debugger.
Meanwhile I consider the bug as fixed.
Comment 6 Chihin Ko 2011-09-22 18:10:34 UTC
(In reply to comment #5)
> verified in sputnik-solstudio-main build #3313 (20110922)
> Now the behavior is the following:
> if a user unchecks "Auto Start Process After Program Was Loaded" then "###
> dbxenv run_autostart off" does not appear in debugger console but when a user
> starts debugging next time the current position line in the editor is not
> highlighted in green and shown in grey (like in dbxtool) and becomes green

Yes, this is expected. When uncheck "Auto Start Process After Program Was Loaded" debugger became load-mode (like dbxtool). It does not start process automatically. The point is debugger should still be able to do "Step" or "cont" in this case.

> after StepOver. It looks like "Auto Start Process After Program Was Loaded"
> checked on after starting the debugger.
> Meanwhile I consider the bug as fixed.
Comment 7 Quality Engineering 2011-09-26 13:26:27 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/791814526f2a
User: chihinko@netbeans.org
Log: manual import of fix for #202153  -  StepInto doesn't work if 'Auto Start Process After Program Was Loaded' is unchecked
Comment 8 Alexander Pepin 2011-09-29 09:28:16 UTC
verified in OSS dev build based on 7.0.1 patch2

see Comment #5