Author Topic: Move cursor to current instruction in Debug mode  (Read 9975 times)

Offline eddyq

  • Multiple posting newcomer
  • *
  • Posts: 56
Move cursor to current instruction in Debug mode
« on: January 03, 2013, 03:31:56 pm »
While debugging I have moved my view away from the current execution line. Now I need to get back there but I don't want to step. How do I do that?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Move cursor to current instruction in Debug mode
« Reply #1 on: January 03, 2013, 03:51:03 pm »
1. debug -> debugging windows -> call stack
2. select the top frame
3. right click -> jump to this file/line
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: Move cursor to current instruction in Debug mode
« Reply #2 on: January 03, 2013, 08:01:11 pm »
in many IDE's I have seen a button which is like a yellow arrow, which always takes you to the current execution line.
BEcause this is an action that one needs rather often.

I have found this much user friendlier then the 3 step solution we have now, which is slow, since the popping up of the callstack is not that fast.

I would suggest we add a similar thing ? And if we would not want to waste a button on it in the debug toolbar, we could give a menu entry in the debug menu we a key shortcut on it.

What do you think ?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Move cursor to current instruction in Debug mode
« Reply #3 on: January 03, 2013, 10:43:10 pm »
What do you think ?
I have the callstack window opened almost all the time, when I'm debugging, so I don't feel a need for it.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: Move cursor to current instruction in Debug mode
« Reply #4 on: January 03, 2013, 11:32:06 pm »
I am not asking on how you work, I am asking on the general user experience  ;D

PS : When I have the callstack open, I have a rather slow debug experience, I think I have noticed, when I start up, it is showing call stack information from previous run), though we are just running and not hitting a breakpoint yet ... Will keep an closer eye, to provide more useful feedback on this.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Move cursor to current instruction in Debug mode
« Reply #5 on: January 03, 2013, 11:38:44 pm »
I am not asking on how you work, I am asking on the general user experience  ;D
Then the call stack update should be optimized... from my point of view  ::)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Move cursor to current instruction in Debug mode
« Reply #6 on: January 04, 2013, 05:24:32 am »
So, it looks like we can send a command "frame 0". (I remember I have asked such question in this forum)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Move cursor to current instruction in Debug mode
« Reply #7 on: January 04, 2013, 09:03:36 am »
So, it looks like we can send a command "frame 0". (I remember I have asked such question in this forum)
Why would you need to do this? As far as I can tell the current position is already available in a variable.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Move cursor to current instruction in Debug mode
« Reply #8 on: January 04, 2013, 12:31:03 pm »
So, it looks like we can send a command "frame 0". (I remember I have asked such question in this forum)
Why would you need to do this? As far as I can tell the current position is already available in a variable.
You are right, I forget about that.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline eddyq

  • Multiple posting newcomer
  • *
  • Posts: 56
Re: Move cursor to current instruction in Debug mode
« Reply #9 on: January 04, 2013, 06:08:16 pm »
I suggest a button. That is what most other IDE's use and it is the easiest for a new user to recognize. I suspect most people keep the call stack open because it takes real estate.