Skip to content

Conversation

awelc
Copy link
Contributor

@awelc awelc commented Sep 11, 2024

Description

This PR adds support for "continue" debugger action. It also makes implementation of "next" ("step over") and "step out" actions faithful to their intended semantics (i.e., executing all instruction in a function stepped over or stepped out of). These changes do not actually change the current behavior of the viewer - they are done in preparation for implementing variable value tracking and displaying.

This PR also includes a refinement of the "step out" action implementation. As also explained in the code comment, previously in the following line of code, after entering foo and stepping out of it, we would immediately step into bar, which could be quite confusing for the user:

assert(foo() == bar());

Finally, this PR also includes some formatting changes for lines that were a bit too long

Test plan

Tested manually

Copy link

vercel bot commented Sep 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 13, 2024 2:19pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Sep 13, 2024 2:19pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Sep 13, 2024 2:19pm
sui-typescript-docs ⬜️ Ignored (Inspect) Visit Preview Sep 13, 2024 2:19pm

this.frameStack.frames.pop();
return this.step(false);

// Do not skip to same line when stepping out as this may lead
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change is unrelated to the "continue" action implementation, but it's small enough that I decided to sneak it in as part of this PR....

}

protected async launchRequest(response: DebugProtocol.LaunchResponse, args: ILaunchRequestArguments): Promise<void> {
protected async launchRequest(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This (and the following) formatting changes were not necessary to achieve the stated goal of this PR but will make the code look better (as a side-note, I don't like TS auto-formatter not formatting these automatically)

Copy link
Contributor

@rvantonder rvantonder left a comment

Choose a reason for hiding this comment

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

looks good!

@awelc awelc merged commit c0b807b into main Sep 14, 2024
48 checks passed
@awelc awelc deleted the aw/trace-view-continue branch September 14, 2024 09:28
suiwombat pushed a commit that referenced this pull request Sep 16, 2024
## Description 

This PR adds support for "continue" debugger action. It also makes
implementation of "next" ("step over") and "step out" actions faithful
to their intended semantics (i.e., executing all instruction in a
function stepped over or stepped out of). These changes do not actually
change the current behavior of the viewer - they are done in preparation
for implementing variable value tracking and displaying.

This PR also includes a refinement of the "step out" action
implementation. As also explained in the code comment, previously in the
following line of code, after entering `foo` and stepping out of it, we
would immediately step into `bar`, which could be quite confusing for
the user:
```
assert(foo() == bar());
```

Finally, this PR also includes some formatting changes for lines that
were a bit too long

## Test plan 

Tested manually
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.

2 participants