Is there something similar to “Set Next Statement”

2020-07-13 03:46发布

Usually while debugging C++ code in Microsoft Visual Studio 2015 I find the "Set Next Statement" very useful. Wanted to check if something similar to "Set Next Statement" is also available in Visual Studio code debugger while debugging a Node js application where I can change the statement where I want my next execution to begin during debugging.

3条回答
女痞
2楼-- · 2020-07-13 04:29

Actually, with VSCode v1.47, June 2020, following issue 92585,

We have added an "alias" for the Jump to Cursor command.
The alias is "Set Next Statement'.
So now it should be available in the command palette.

See commit fb28ced.

New command alias Set Next Statement for Jump to Cursor

To make the command Jump to Cursor more discoverable for users coming from Visual Studio, we've added the command alias Set Next Statement.

If you don't know what Jump to Cursor does: it lets you move program execution to a new location without executing any of the source code in between.

查看更多
可以哭但决不认输i
3楼-- · 2020-07-13 04:30

Yes, this feature is available under the name "Jump to Cursor":

https://code.visualstudio.com/updates/v1_36#_jump-to-cursor

It will become available as an "Set next statement" alias:

https://github.com/microsoft/vscode-python/issues/9947#issuecomment-610631969

As of now,

No.

This is a much-requested feature,

and some work with that aim has been done already:

But the feature is not available yet in VS Code.

查看更多
三岁会撩人
4楼-- · 2020-07-13 04:36

Install the vsc extension of the link below.

https://marketplace.visualstudio.com/items?itemName=ntoskrnl7.cxx-set-next-statement-extension

It works well in cppvsdbg (vscode-cpptools -OpenDebugAD7).

However, GDB requires the following VSC extension to be installed. https://github.com/ntoskrnl7/code-debug/tree/support_gdb_goto_request

enjoy :)

查看更多
登录 后发表回答