Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Adjust api breakpoint if resolved in another line #330

Merged
merged 3 commits into from
Sep 20, 2017

Conversation

gaofanmichael
Copy link
Contributor

Change api type breakpoint location line number if the breakpoint was
originally set to a line with only comments. The new line that
breakpoint set to will be actual paused line in code.

Change api type breakpoint location line number if the breakpoint was
originally set to a line with only comments. The new line that
breakpoint set to will be actual paused line in code.
@gaofanmichael gaofanmichael self-assigned this Sep 18, 2017
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 18, 2017
@jmdobry jmdobry added in progress and removed cla: yes This human has signed the Contributor License Agreement. labels Sep 18, 2017
return {
location: {line: this.state_.frame(0).sourceLine()} as

This comment was marked as spam.

This comment was marked as spam.

@@ -612,6 +612,11 @@ export function create(
// TODO: Address the case where `breakpoint.expression` is `undefined`.
const captured = state.capture(
execState, breakpoint.expressions as string[], config, v8);
if (breakpoint.location !== undefined &&

This comment was marked as spam.

This comment was marked as spam.

@@ -500,6 +500,29 @@ describe('v8debugapi', function() {

});

it('should resolve correct breakpoint line number', function(done) {
// clone a clean breakpointInFoo
// TODO: Have this actually implement Breakpoint

This comment was marked as spam.

This comment was marked as spam.

@@ -500,6 +500,29 @@ describe('v8debugapi', function() {

});

it('should resolve correct breakpoint line number', function(done) {

This comment was marked as spam.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 18, 2017
Copy link
Contributor

@matthewloring matthewloring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nit.

@@ -612,6 +612,8 @@ export function create(
// TODO: Address the case where `breakpoint.expression` is `undefined`.
const captured = state.capture(
execState, breakpoint.expressions as string[], config, v8);
if (breakpoint.location && captured.location && captured.location.line)

This comment was marked as spam.

This comment was marked as spam.

@gaofanmichael gaofanmichael merged commit 7a7b20d into googleapis:master Sep 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants