Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column breakpoint #770

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cosminadrianpopescu
Copy link

This PR adds the possibility to also set the column when toggling or setting a breakpoing.

For example, given this code:

const arr = [{name: 'Name 1', id: 1}, {name: 'Name 2', id: 2}];
console.log(arr.map(x => x.id));

If I go on the second line and I call lua require('dap').toggle_breakpoint(), this would set the breakpoint before logging. This means that the program would stop only once, before the console log, without giving me the possibility to stop and to debug also what happens inside the mapping.

This PR adds the toggle_breakpoint_column, with the same parameters as toggle_breakpoint.

So, for example, I could go with the cursor on the x from x.id (line 2, column 26) and call lua require('dap').toggle_breakpoint_column(). This would set the breakpoint inside the arr.map. This means that it would stop for each value of the array, and I could debug each value of the array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant