vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Add breakpoint context action: Jump To Line

Open xiaoyun94 opened this issue 1 year ago • 2 comments

image

xiaoyun94 avatar Feb 06 '24 18:02 xiaoyun94

Can you tell me more?

roblourens avatar Feb 12 '24 15:02 roblourens

Can you tell me more?

Editor Context Menu Items: image

Breakpoint Context Menu Items now: image

The reason why add an action into breakpoint context menu is that i installed too many extensions. so threre about 20+ editor context menu actions(shortcut shows my home pc rather than working use) Editor Conext Menu is easy to be effected by other extensions, but breakpoint Context Menu is limited to be modified.

xiaoyun94 avatar Feb 18 '24 12:02 xiaoyun94

I see, I actually wasn't familiar with that command. It probably makes sense to have it where Run to Line appears.

Does this work though? Doesn't it need to do all the other code after gotoTargets that https://github.com/microsoft/vscode/blob/6e539e3b7bed24d888ee56bb56c23cafb35b855a/src/vs/workbench/contrib/debug/browser/debugCommands.ts#L356-L369 does?

roblourens avatar Feb 19 '24 13:02 roblourens

我明白了,我实际上并不熟悉这个命令。将它放在 Run to Line 出现的地方可能是有意义的。

不过,这行得通吗?在那之后它不需要做所有其他代码吗gotoTargets

https://github.com/microsoft/vscode/blob/6e539e3b7bed24d888ee56bb56c23cafb35b855a/src/vs/workbench/contrib/debug/browser/debugCommands.ts#L356-L369

does?

i have tested in my code server. it works. Jump to Cursor : may find 2 or more targets due to multi cursors, so it must ask user to choose one. but Jump to Line here set collom is 0 column at expected line, the cursor is unique, so there is no need to choose.

xiaoyun94 avatar Feb 19 '24 16:02 xiaoyun94

I don't think that gotoTargets is expected to have a side effect. If it works, I wonder whether the DA is doing the wrong thing for that request. The description of the request is This request retrieves the possible goto targets for the specified source location.. I will test it next week.

roblourens avatar Feb 19 '24 18:02 roblourens

@roblourens Are you making progress?

xiaoyun94 avatar Mar 14 '24 09:03 xiaoyun94

Sorry, it's been a busy time but I will get to it

roblourens avatar Apr 24 '24 17:04 roblourens

Which debugger are you using to test this? I don't see how this can work without calling session.goto, if the DA does the right thing. I think gotoTargets should only retrieve a list of targets.

roblourens avatar Jul 26 '24 23:07 roblourens

Which debugger are you using to test this? I don't see how this can work without calling session.goto, if the DA does the right thing. I think gotoTargets should only retrieve a list of targets.

I use Native Debug as C program Debuger, and it works well @roblourens

xiaoyun94 avatar Aug 07 '24 02:08 xiaoyun94