dape icon indicating copy to clipboard operation
dape copied to clipboard

[Feature request] Jump to breakpoint on hit

Open heyitscassio opened this issue 1 year ago • 4 comments

It would be a nice feature that, when a breakpoint where to be reached, dape would jump the cursor to the line with the breakpoint, or the line where the exception were thrown.

Is this feature wanted? Maybe I could work on it in the weekend.

I imagine this would be a opt-in configuration, to not mess with the current behavior.

heyitscassio avatar Sep 27 '24 14:09 heyitscassio

Hi! I am glad you are interested in dape. I am not sure if I understand what jump means in this context? Is not the buffer opened and the cursor moved to the stopped line or is it something like the following https://github.com/svaante/dape/discussions/130 you mean by jump?

Could you please elaborate what you mean by jump?

svaante avatar Sep 28 '24 11:09 svaante

Hi! I am glad you are interested in dape. I am not sure if I understand what jump means in this context? Is not the buffer opened and the cursor moved to the stopped line or is it something like the following #130 you mean by jump?

Could you please elaborate what you mean by jump?

It would be the first option, when a breakpoint is reached, it would be nice if the cursor moved to the stopped line.

heyitscassio avatar Sep 29 '24 06:09 heyitscassio

This sounds like a bug as the dape should on stopped event:

  1. open source file and display the buffer
  2. move the cursor to the stopped line
  3. create the fringe or margin arrow
  4. select the window displaying the buffer displayed from (1.) (if not the current buffer is *dape-repl*)

svaante avatar Sep 29 '24 09:09 svaante

This sounds like a bug as the dape should on stopped event:

  1. open source file and display the buffer
  2. move the cursor to the stopped line
  3. create the fringe or margin arrow
  4. select the window displaying the buffer displayed from (1.) (if not the current buffer is *dape-repl*)

In the python debugger, it seems that it works sometimes. When I have time I will try to reproduce it with a simple init file and python project.

heyitscassio avatar Oct 02 '24 16:10 heyitscassio

Please reopen the issue if you have any updates

svaante avatar Nov 30 '24 16:11 svaante

sorry for the delay. Tested it again and it works fine. Thanks!

heyitscassio avatar Dec 03 '24 18:12 heyitscassio